I created a string separated by commas.
I want to save it using the savedialog but this code doesn't work:
CSV_string := '1,2,3' ;
if SaveDialog1.Execute
then CSV_string.savetofile(SaveDialog1.FileName + '.csv');
I've discovered that .savetofile doesn't work with strings, so how do I...
The declare array method (see Prattaratt's solution above) using pointers works well (but requires an array to be defined, and pointers look so ugly). Based on sggaunt's explanation and through reading the Delphi help file and its FindComponent example, the following code seems to work quiet...
Also tried this, without luck:
procedure TForm1.Button1Click(Sender: TObject);
var
I : integer;
myname : string;
begin
for I := 1 to 5 do
begin
myname := 'checkbox'+inttostr(i);
tcheckbox(myname).Checked := false;
end;
end;
I want to reset all my check box's to unticked. I can do it with the following code but is there a short hand way to code this using a FOR statement:
procedure TForm1.Button1Click(Sender: TObject);
begin
checkbox1.checked := false;
checkbox2.checked := false;
checkbox3.checked := false...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.