LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

save data in list control

Solved!
Go to solution

Hello all,

 

I have programmatically changed a list item in a list control from "51" to "77" using the NI function "ReplaceListItem(.....)".

When I exited the program and looked at the list control I observed the list item still has "51" (instead of the expected "77").

 

The question is, "how do I permanently replace a list item in a list control?"

Thank you.

 

Bob

0 Kudos
Message 1 of 3
(2,862 Views)
Solution
Accepted by topic author Robert_Mensah

If I understand correctly, you have set some items in the list control within the UiR editor, next you want to change one of them programmatically and have this change reflected in the UIR file.

Well, if this is what you are trying to accomplish, there is no easy way to obtain it: changes operated programmatically terminate their scope when you exit the program and do not reflect in physical files. You should use the ActiveX interface to CVI, save the UIR in TUI format with CVI_AppConvertUIRToTUI () function, programmatically edit the TUI file, save it and then convert it back to UIR format by means of CVI_AppConvertTUIToUIR (). Not a trivial task, I'm afraid, and possibly this task is not worth the effort.

 

A more simple way is to have an external options file or configuration file where to store items to load in the list control when you need them: this file can be edited by yourself either programmatically or manually when you need to change some element.

 



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(2,857 Views)

I would choose the file option.

Thank you for your suggestion.

 

Bob

0 Kudos
Message 3 of 3
(2,854 Views)