LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I programatically fill a list box on loading a user interface?

Using CVI, I am trying to load the items of a list box dynamically with the loading of the user interface. These items could be different for each run of the program. So, I want to create a list box of these items and display that list box on the user interface without having the user click on a button or generate an event that allows me to go off and create the list.

Is there an onLoad event or some other mechanism I can use to create the list so that when the user interface loads up..BANG! There's my unique list!

I have considered creating a modal popup panel with a "click to continue" type button. This button would generate an event that allows me to go off to create my unique list...whic
h I use to update the original empty list box on the user interface lying under the modal popup. After the modal popup is closed, it would then appear to the user that the list was there on the user interface all along.

This complicated approach presents unique problems of its own. I am looking for a more elegant solution.

Thanks,
Kay
0 Kudos
Message 1 of 3
(3,210 Views)
Just populate the listbox in the main function before you call DisplayPanel and after LoadPanel. That way you will have the panel handle to work with, but the panel won't be visible yet.

Best Regards,

Chris Matthews
National Instruments
Message 2 of 3
(3,210 Views)
You are a genius. 🙂

Thank you,
Kay
0 Kudos
Message 3 of 3
(3,210 Views)