LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making a Array controlled list?

Hi 

I am trying to make a pull down list in labview similar in manner to a webpage pulldown list found in "internet explorer" or any web browser.

 

 

I would like the contents of the pull down list to be that of the array. I have invested a lot of time trying to figure this problem out, however I have failed to come up with a solution. 

 

I would greatly appreciate any help.  

 Thanks,

 Philip

 

 

0 Kudos
Message 1 of 7
(3,070 Views)

 To clarify,

 

 If I had a 1-D array of length 3, with values {"amber","alert","alligator"}

The resulting pulldown list would look like this

 

amber 

alert

alligator 

 

 (note it should look internet explorer pulldown style) Thanks

0 Kudos
Message 2 of 7
(3,059 Views)
Look at a combo box.  There are two property nodes, StringsandValues[] and also Strings[] that allow you to programmatically define the lists that go into that combo box.
0 Kudos
Message 3 of 7
(3,049 Views)

 

Thanks, I am making progress.

 

 

 

 

 

Any idea how to fix this problem? I saw this working in an example. In the labview example, the pink rectangle above "StringsAndValues[]" was blue. How do I make it blue? Thanks.aasd.JPG

0 Kudos
Message 4 of 7
(3,039 Views)
I would like the combo box to output the array location
0 Kudos
Message 5 of 7
(3,034 Views)

Hi Doom,

 

when switching on the context help for that property you would see that it requires an array of cluster of 2 strings...

 

What do you mean by "array location"? If you want the index of the choosen string you have to do a 1d array search through the array given by property "String[]" (or through your array of strings, as you want to set those strings anyway).

Message Edited by GerdW on 06-23-2009 12:20 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(3,028 Views)

Hello,

You can only pass strings into this property node (pink). What I would suggest is just to use the Number to Decimal String conversion VIs to convert your integer (blue) in to string. Then build a 1D array of these values and pass it to the Strings[] property for the Combo Box.

National Instruments
0 Kudos
Message 7 of 7
(2,974 Views)