Sets the currently selected item in a list box or combo box by index.
Takes gizmo (Int) and index (Int).
Returns 1 or 0 if LB_ERR.
BGI GUI
Parameters & Returns
Parameters
gizmoInt
indexInt
Returns
Int
Quick Summary
Sets the currently selected item in a list box or combo box by index.
Takes gizmo (Int) and index (Int).
Returns 1 or 0 if LB_ERR.
Technical Exegesis...
Sets the currently selected item in a list box or combo box by index. Searches gizmoMap for the gizmo ID. For GIZMO_LISTBOX, sends LB_SETCURSEL with index, returns 1 or 0 if LB_ERR. For GIZMO_COMBOBOX, sends CB_SETCURSEL with index, returns 1 or 0 if CB_ERR. Returns 0 if gizmo not found or unsupported gizmo type.
This function programmatically selects an item in the list or combo box. index is 0-based position (0 = first item, 1 = second item, etc.). Works with both GIZMO_LISTBOX and GIZMO_COMBOBOX types.
Sets the currently selected item in a list box or combo box by index. Searches gizmoMap for the gizmo ID. For GIZMO_LISTBOX, sends LB_SETCURSEL with index, returns 1 or 0 if LB_ERR. For GIZMO_COMBOBOX, sends CB_SETCURSEL with index, returns 1 or 0 if CB_ERR. Returns 0 if gizmo not found or unsupported gizmo type.
This function programmatically selects an item in the list or combo box. index is 0-based position (0 = first item, 1 = second item, etc.). Works with both GIZMO_LISTBOX and GIZMO_COMBOBOX types. Returns 0 for invalid indices (LB_ERR/CB_ERR). Use for setting initial selections, restoring saved state, or implementing item navigation. For combo boxes, this also updates the edit field text (if editable combo).