LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to update items in combo box programmatically

I have a problem on updating items in combo box programmatically, such as add or remove a item from the list. I can add or delete without any problem once the vi is running. I can see it is changed by pressing drop button. But after I close the vi and rerun it, the change I did last time is lost. It seems it not permenatly change the list. Anyone has an idea?
0 Kudos
Message 1 of 5
(3,582 Views)
Are you using an LV-EXE or a VI? If it's a VI you have to resave it after updating, if EXE, than you have to save all items/updates in a extern file like INI.
0 Kudos
Message 2 of 5
(3,580 Views)
Exactly. I did both. Eventurally, I have to built a LV-EXE. I know I have to save before it is updated. I just wondering is there anyway it is updated like we edit it in the porperty without saving or writing to a file.
0 Kudos
Message 3 of 5
(3,574 Views)
If you are changing the list programmatically why do you believe that it should be permanent? If it's permanent, why are you changing it programmatically? Doesn't make a whole lot of sense.

If you're talking about saving the values as "default" in the same way you do with the development environment, you cannot do this with an EXE. This is a FAQ. You have to update the list programmatically, saving the "new" default values to file.
Message 4 of 5
(3,561 Views)
programmatically means I don't have to modifiy the items by openning the property of combo box but still add or remove a item in the list. And i dont want to lose the change i did before. OK, it seems there is no way other than write it to a file.
0 Kudos
Message 5 of 5
(3,558 Views)