Delphi Listbox Save To File

08.09.2019by admin
Delphi Listbox Save To File 4,9/5 7217 reviews
  1. Delphi Listbox Save To File Taxes

I need to import whole lines from text file into checked listbox as items. To be accurate every line contains Name, Surname, and number values separated with spaces. I would like to import those lines into the checked listbox as items and work with their values later (read them etc.). Save listbox items to ini file General. Assuming you have the INI file already created and stored in a variable called theIni. Mobile application powerpoint presentation template free. Quick filling a listbox with file names. #29: quick filling a listbox with file names.

Save

I want to save to.ini and after fill checklistbox items from the saved ini file. I have 2 listboxes like.First listbox contains tables:. Cars. Customers. Users.

SuppliersThe second listbox links to the first, if I click on Cars table and checked it the following datas will be visible on the second checklistbox.Second listbox contains table fields:CARS - CarID- CarName- CarLicNum- CarColor etc.USERS. UserID. UserName. UserPassword etc.Anyone can help me how can I save all the checked items (from checklistbox 1 and checklistbox2) to.ini file?

And after how can I load and fill the checklistboxes with them?I did for the first checklistbox but. I guess your problem is getting your head around the fact that the contents of the second list box change, and so the risk of error is quite high. I agree with that and so the answer is to ignore the list boxes themselves and focus on what they represent, and so store the data that the user wants to see - and in this case I would use field names for that - so ini.WriteString('File To View', 'Name', 'Cars');and for the fields ini.WriteInteger('Cars', 'Count', 2);ini.WriteString('Cars', 'Field 1', 'CarsID');ini.WriteString('Cars', 'Field 2', 'CarLICNUM');I guess that you only allow one box in the first checkbox to be checked. If that were not true, or later became not true, you would add count and 'Name x' parameters like this ini.WriteInteger('File To View', 'Count', 2);ini.WriteString('File To View', 'Name 1', 'Cars');ini.WriteString('File To View', 'Name 2', 'Users');So changing your GUI later becomes easy, as does making your new program backwards compatible.

This is the point LU RD makes about basing your INI file on your business model and not your GUI.Note also the fact that you may store multiple sections - one for each file in fact, but that doesn't really matter and has the hidden benefit that the INI file 'remembers' the users last choice of fields for each file.

When answering a question please:. Read the question carefully. Understand that English isn't everyone's first language so be lenient of badspelling and grammar. If a question is poorly phrased then either ask for clarification, ignore it, oredit the question and fix the problem.

Delphi Listbox Save To File Taxes

Insults are not welcome. Don't tell someone to read the manual.

Chances are they have and don't get it.Provide an answer or move on to the next question.Let's work to help developers, not make them feel stupid.