help! WriteLN to write to a specific line in text file
Posted on 2003-11-23
I am trying to write a program with a checkbox, so that when the checkbox is clicked the following is written to a text file
Dave speaks good english true;
if the checkbox is unclicked
Dave speaks good english false;
When using WriteLn it writes to the first line of the text file i have specified, but i want to write to another line, for example, line 10. I have the following code which i couldnt get to work.
procedure Tform1.CheckBox1Click(Sender: TObject);
if checkbox1.checked then
line:='dave speaks good english true;';
line :='dave speaks good english false;';
My first problem is that i cant seem to use the if else statement to write a line to a text file if the checkbox is clicked if not clicked write a different line to a text file, and the second problem is that i dont know how i could change my code to write to another line of the text file rather then line 1, for example line 10. Thanks in advance!!