LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you set an array of combo boxes to a specific value?

Solved!
Go to solution

I have an array of combo boxes that I would like to set to a specific value. When I tell my program to set them it only sets the combo box that I most recently changed and none of the others. 

 

I've attached a small vi that demonstates the problem. 

 

Thanks, 

 

--Ben

—Ben
Prevent your computer from sleeping programmatically!
Use Power Requests
Download from GitHub

0 Kudos
Message 1 of 6
(2,454 Views)

Use the "Make Current Value Default"  (Right Click Mouse... Operation > Make Current Value Default) and create a Reinitialize to Default Invoke Node and put in Reset Button (Event Structure). Works Perfectly Fine :]

Message 2 of 6
(2,451 Views)

Your property node is for only one combo box (you can see this on the label and also by double clicking to go to UI element).

If you want to change all of them then either follow previous suggestion or create a property node for the array and not just one of the combo boxes.

 

2013-07-24 09_32_39-ComboBoxProblems.vi Block Diagram _.png

0 Kudos
Message 3 of 6
(2,444 Views)

Thanks, I know that my property node is only for the combo box. 

If I use a property node for the array do you know which property I would use to set all the combo boxes simultaneously? I've tried several that looked like they might work, but no luck. 

—Ben
Prevent your computer from sleeping programmatically!
Use Power Requests
Download from GitHub

0 Kudos
Message 4 of 6
(2,425 Views)

The reset to default works as you say but still concerns me. 

The program I attached is only a demo of the problem. My final program is actually an arry of clusters. Each cluster has the combo box and a string. If I reset the array to default it clears the strings to their deafult. This will annoy my users. I'd really like to set the combo boxes without resetting the stringsin the cluster. 

Thanks, 

—Ben
Prevent your computer from sleeping programmatically!
Use Power Requests
Download from GitHub

0 Kudos
Message 5 of 6
(2,423 Views)
Solution
Accepted by topic author Ben_Manthey

That would be the value property --

 

2013-07-24 10_46_12-ComboBoxProblems (1).vi Block Diagram _.png

Message 6 of 6
(2,419 Views)