LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Dropdown Menu from array of strings

Hi, 

 

I feel like there must be a simple solution to this but I can't figure it out. I am a newbie to Labview. 

 

I am writing a VI which I want to be modular and be able to be used flexibly in the future. I have a set of strings, drawn from string control boxes, which I want to turn into a Drop Down Menu on the front panel, presumably using a combo box. I then want the selection to be able to be used as an input in other parts of the VI.

 

I cannot figure out how to populate my drop down menu without using the Edit Items command (which would render the function static and not useful for my purpose). I think it has something to do with using a property node...although this may be over complicating. To be clear, I don't need this to dynamically update during a run, just to allow me to create sub-VIs without having to Edit items every time. 

Any and all advise or suggestions of where I can find help appreciated. 

 

 

0 Kudos
Message 1 of 4
(755 Views)

Check out the "Strings and Values" property. Is that the kind of thing you are looking for?

 

https://labviewwiki.org/wiki/Ring_class/Strings_And_Values_()_property

0 Kudos
Message 2 of 4
(742 Views)

Yes I think so. I'm looking at the Example given for Programmatically adding Ring items (attached). Which would work for me (even though I don't need the dynamic aspect) but I cannot figure out how to use the value from the dropdown menu as an output of any kind. 

 

Feel like I'm being so dumb but it's just not clear to me what is going on here. 

 

 

0 Kudos
Message 3 of 4
(734 Views)

Got it. Yes I just took everything out of the event case and was able to simplify it. 

 

Thanks

Message 4 of 4
(730 Views)