LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

getting pos of selected item in combo box

I am currently using a combo box as a drop down selection. I need to get the position of the currently selected
item durring run time. If the user selects item 3 within the combo box I need to read back a 2 based on a zero based index.
0 Kudos
Message 1 of 2
(3,104 Views)
When the selection has been committed, just call GetCtrlVal to get the current value of the combo box (string ctrl), then call Combo_GetIndexFromValue with the value you just read to get the 0-based index.  The combo box functions can be found in CVIXX\toolslib\custctrl\combobox.fp.

Hope this helps.

Mert A.
National Instruments
Message 2 of 2
(3,098 Views)