annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

programmatically update currently selected combo box item???

Risolto!
Vai alla soluzione

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
Messaggio 1 di 13
8.798Visualizzazioni

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
Messaggio 2 di 13
8.792Visualizzazioni

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
Messaggio 3 di 13
8.781Visualizzazioni

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
Messaggio 4 di 13
8.776Visualizzazioni

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
Messaggio 5 di 13
8.772Visualizzazioni

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
Messaggio 6 di 13
8.765Visualizzazioni

is this what you mean?

0 Kudos
Messaggio 7 di 13
8.759Visualizzazioni
Soluzione
Accettato da 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.
Messaggio 8 di 13
8.755Visualizzazioni

yes. thanks for you help. cheers 🙂

0 Kudos
Messaggio 9 di 13
8.751Visualizzazioni

Best of luck

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Messaggio 10 di 13
8.745Visualizzazioni