LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dropdown list-dynamically update while dialog is running?

Hi everyone,
I am a newbie with Labview, and am having trouble coming up with a
solution to the following problem. I have a dialog for report
generation that contains a dropdown list with the names of various
users of the VI. This dropdown is currently a RingText, but I need to
make it so that when a user is added to the system, the dropdown
automatically shows the new user's name (without having to restart the
VI) so that the user can select him/herself as the creator of the
report.

This is not possible to accomplish with a RingText, but I have been
unable to find a more suitable structure/way to accomplish what I
need. Anyone have any suggestions?

Thanks in advance!
0 Kudos
Message 1 of 3
(2,939 Views)
To update the text ring at runtime use the property Strings[] and pass in an array of strings (your user List)  wen a user is added to this list you repete the process.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 3
(2,928 Views)

I solve this problem in my vi's using list boxes.  I would save the names for the users in a text file.  When you add a name to the text file, you can trigger an event and have a case that reads the text file which now includes the new name. 

Something like this: (using a queued message handler template)

Push a button that brings up a dialog to add the new person. (Done in an event case) 

When the user hits OK, it saves the new name to the "username" text file.

Add a queue to update the display

In the update display case, read the text file and use the names to populate the item.names on a property node for the listbox.

Here is a terrible implementation but you can see the flow.  I only had a couple of minutes so I apologize for the sloppiness (Labview 8.2)

 

Tom Haggerty



Message Edited by Tom Haggerty on 01-22-2008 01:00 PM
Download All
0 Kudos
Message 3 of 3
(2,927 Views)