11-10-2010 02:29 AM
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.
Solved! Go to Solution.
11-10-2010 02:45 AM
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.
11-10-2010 03:24 AM
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?
11-10-2010 04:06 AM
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.
11-10-2010 04:08 AM
see this vi.
One thing that I did't mention in the block diagram i.e. you should use event structure.
11-10-2010 04:33 AM
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?
11-10-2010 05:16 AM
is this what you mean?
11-10-2010 05:31 AM
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?
11-10-2010 05:33 AM
yes. thanks for you help. cheers 🙂
11-10-2010 05:56 AM
Best of luck