![]() Quote The file gets created but none of the strings in the list are saved to it. OnCloseQuery Quote Igor Ivanov wrote in message news. I have deleted that file from my current directory before running the program and it creates the file myfile.dat with no data in it. I loaded about 30 file names into the list box and Im sure they are all there, they just dont get saved. I stripped the code down so that is all it is doing an it still does not save the lines. In order to start working with text files from Delphi we have to link a file on a disk to a file variable in our program. Is there a bug in the SaveToFile method I could write them all out manually but that takes more code. ('c:\data.txt') otherwise you need to create the file and write to it. The file gets created but none of the strings in the list are saved to it. ![]() In the forms OnCloseQuery, I have have a line of code that should save the strings to a file (MyFile.Dat) in the OnCreate event I load the data back into the ListBox if FileExists(MyFile.Dat) then (MyFile.Dat) Heres the problem. Delphi Listbox Save To File Code That Should The user loads filenames into the listbox using the standard open file dialog box. I would need to have the code in the form1closed event. I have another file that Im readingwriting info fromto in the same events. I would like save my listbox items to a file, so that when I close the form it will at that time save, so that when I open the app the items in the listbox will reload and they will be there. ![]() Delphi Listbox Save To File By kaiwaicraxit1989 Follow | Publicĭelphi Listbox Save To File Code That Should ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |