LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to made multiple selected value boxes in GUI

Solved!
Go to solution

Hi,

 

I am writing a program that users can put a check mark on several boxes for input voltages (like 0.6v 1 v 2 v 3 v).The seleted voltage will be looped into an Vset vi. Does anyone has any idea how to make this?

 

Thanks!

 

 

0 Kudos
Message 1 of 12
(3,014 Views)

I would use a listbox with a selection mode of 1 or more

Example_VI.png


"Should be" isn't "Is" -Jay
Message 2 of 12
(3,010 Views)

Thank you! Jeff.

That's what I want.

 

Tianshu

0 Kudos
Message 3 of 12
(2,995 Views)
Thank you, Is done with Kudos. That's what I want, is marking the post solved. welcome to the forums. it helps others search for similar solutions. I'm glad I could help.

"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 12
(2,986 Views)

Don't forget that you were initially talking about checkboxes. You can easily change the listbox to "show symbols", then change the symbols to a  checkmark for each selected element.

 

0 Kudos
Message 5 of 12
(2,946 Views)
Solution
Accepted by topic author tian66
Message 6 of 12
(2,939 Views)

Very appreciate this answear! 

0 Kudos
Message 7 of 12
(2,882 Views)

Of course my example is very primitive and just shows the idea. In real life you should use an event structure to update the control only when things change. Also the selection color needs to be set only once at the start of the program or even be saved with the VI and not set at all programmatically after that.

0 Kudos
Message 8 of 12
(2,876 Views)

How Can I read each value from the listbox? I found the value coming out from the listbox is the index but not the actual elements.

Thanks!

0 Kudos
Message 9 of 12
(2,866 Views)

Just use the array of selected indices and index into the array of item names. Wrap a for loop and you'll get an array of all selections.

0 Kudos
Message 10 of 12
(2,862 Views)