Add list object implementation not working? - Forum

Forum Navigation
You need to log in to create posts and topics.

Add list object implementation not working?

I am not having luck with the ListBoxAddItem object. Added items show while the app is running but don't persist after the application is closed and reopened. What am I doing wrong.

InputBox "Enter New Item" "Enter New Item" "[newitemtoaddname]"
ListBoxAddItem "ListBox3" "0" "[newitemtoaddname]"
ListBoxSort "ListBox3" "True"

Hello,

The ListBox content is not stored back into the exe. It only hold in memory during runtime.

You must hold your data in a text-file or database which gets stored to disk.

Regards

Hans-Peter

luishp has reacted to this post.
luishp

I see what your saying but if you enter list items in the listobject manually they are held by the application. They are held somewhere and load with the application. I assumed that the ListBoxAddItem would write to the same location in the application. For my own curiosity is there some hidden array they are storing the manually entered list?

 

However taking your advice I have solved this by saving the list to a File .

As always thanks for your help

Uploaded files:
  • You need to login to have access to uploads.

Hello,

>I see what your saying but if you enter list items in the listobject manually they are held by the application.

That is right, but a different process.

When you add the items into the object, they are part of the object propertys.

That gets compiled into the app. You can see them also in the pub-source when you view it with a text editor.

But when you add items by code this happens on runtime and after the compile-process.

So a complete different process.

Regards

Hans-Peter