Gets the index of the currently selected item in a list box or combo box.
Takes gizmo (Int).
Returns index or -1 if LB_ERR (no selection).
BGI GUI
Parameters & Returns
Parameters
gizmoInt
Returns
Int
Quick Summary
Gets the index of the currently selected item in a list box or combo box.
Takes gizmo (Int).
Returns index or -1 if LB_ERR (no selection).
Technical Exegesis...
Gets the 0-based index of the currently selected item in a list box or combo box. Searches gizmoMap for the gizmo ID. For GIZMO_LISTBOX, sends LB_GETCURSEL message, returns index or -1 if LB_ERR (no selection). For GIZMO_COMBOBOX, sends CB_GETCURSEL message, returns index or -1 if CB_ERR (no selection). Returns -1 if gizmo not found or unsupported gizmo type.
This function returns which item is currently selected. Returns 0-based index (0 = first item, 1 = second item, etc.).
Gets the 0-based index of the currently selected item in a list box or combo box. Searches gizmoMap for the gizmo ID. For GIZMO_LISTBOX, sends LB_GETCURSEL message, returns index or -1 if LB_ERR (no selection). For GIZMO_COMBOBOX, sends CB_GETCURSEL message, returns index or -1 if CB_ERR (no selection). Returns -1 if gizmo not found or unsupported gizmo type.
This function returns which item is currently selected. Returns 0-based index (0 = first item, 1 = second item, etc.). Returns -1 when no item selected or gizmo not found. Works with both GIZMO_LISTBOX and GIZMO_COMBOBOX types. Use for reading user selections, processing selection changes in BGI_EVENT_COMMAND_UPDATE events, or querying current state. Common pattern: get index, then use bgiGetGizmoItemString to retrieve selected item text.