Delete stuff in memobox
-
I have a question is it possible to delete the content of a textfile which items are all in a memobox example AssignFile(f, 'C:\windows\system32\drivers\etc\hosts'); {Assigns the Filename} Append(f); {Opens the file for editing} //Writeln(f, '127.0.0.1 '+ memo); Writeln(F, Memo.text); //Could be multi-line... //Writeln(F, 'www.'+ Memo.text); //Could be multi-line... Closefile(f); {Closes file F} This appends to a file text from a memo field, I want a 2nd button that removes only the ontent that is currently in the same memobox. Trick is there is other items in the textbox so i cant just recreate the file. Anyone able to help ot give pointers?
-
I have a question is it possible to delete the content of a textfile which items are all in a memobox example AssignFile(f, 'C:\windows\system32\drivers\etc\hosts'); {Assigns the Filename} Append(f); {Opens the file for editing} //Writeln(f, '127.0.0.1 '+ memo); Writeln(F, Memo.text); //Could be multi-line... //Writeln(F, 'www.'+ Memo.text); //Could be multi-line... Closefile(f); {Closes file F} This appends to a file text from a memo field, I want a 2nd button that removes only the ontent that is currently in the same memobox. Trick is there is other items in the textbox so i cant just recreate the file. Anyone able to help ot give pointers?
I don't understand good enough your question. Try yo use
memo1.lines.savetofile
and save content of Memo1 direct as file.
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com