LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically update currently selected combo box item???

Solved!
Go to solution

is there a property node or another method which will enable me to update the currently selected item in a combo box programmatically? i am trying to build a routine whereby the user goes to an element (actually another graph) by selecting it from a combo box, or just presses a forward or back button to go to the current or previous element. basically i have an 2d array where a row is sent to a waveform graph based on the user selection.

0 Kudos
Message 1 of 13
(7,895 Views)

You can use "strings[]" property to get total items in combo box.

Calculate length of it using "Array size". Keep a "current value "(shift register). So when you press FWD or REV just increment or decrement "Current value". Use index array connect "strings[]" property to it , "Current value" to index and output to "Value" property of your combo box.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 2 of 13
(7,889 Views)

ok i couln't quite understand how to implement what you explained. i got the idea of using a shift register to update the indexes, but thats about it. i have attatched some code of my attempt. so what am i doing wrong?

0 Kudos
Message 3 of 13
(7,878 Views)

ok minor update. i can now update the combo box when i click fwd or rvs however i don't know how to stop this from overriding what the user clicks in the combo box.

0 Kudos
Message 4 of 13
(7,873 Views)

see this vi.

One thing that I did't mention in the block diagram i.e. you should use event structure.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 5 of 13
(7,869 Views)

i have to say i am not very familiar with event structures, but i am assuming using one is supposed to solve the issue of the index value set by the forward and back buttons overriding the value the user selects in the combo box? any possibility of an example?

0 Kudos
Message 6 of 13
(7,862 Views)

is this what you mean?

0 Kudos
Message 7 of 13
(7,856 Views)
Solution
Accepted by topic author eword

Yes...This will serve your purpose.

Now your code will execute only when event occurs.

Are you satisfied with this? Is this solves your problem?

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
Message 8 of 13
(7,852 Views)

yes. thanks for you help. cheers 🙂

0 Kudos
Message 9 of 13
(7,848 Views)

Best of luck

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 10 of 13
(7,842 Views)