Re: Save content of listbox
To save you would loop through the items in the listbox one by one until you reach the end. To load you would clear the list box and read your saved list adding each item to the list as you go.
Re: Save content of listbox
So it isn't possible with string (in My.Settings) ?
How would the code look example.
Re: Save content of listbox
Not really. You'd have to save an ARRAY LIST of ITEMS, and then parse them by hand to load them. If you save them into a table, then you can bind to the table automatically.
Search around for the avenue to want to pursue. There are lots of examples on each method
Re: Save content of listbox
Junday
I did not say it wasn't possible to save in My.Settings but you are not dealing with a single text property here. You are dealing with any number of strings, 1 per list item. It is possible to read them in one by one and add them to a string with a seperator and then save that string doing the reverse to load them. It is possible to save each entry as a seperate string, It is possible to save them to a file of your choice, a database, registry or whatever you like but you need to loop through the list box to do so or at least you should. The only way that I am aware of that would not require looping through the list would be binding to a database and that has its own set of problems.