Row Helpers (bool; on false Check guiGetLastError)

Function Description
guiAppendDropDownItem(gui_id, handle, text) Append row at end.
guiInsertDropDownItem(gui_id, handle, index, text) Insert at index.
guiReplaceDropDownItem(gui_id, handle, index, text) Replace row text.
guiRemoveDropDownItem(gui_id, handle, index) Remove one row.
guiRemoveDropDownItemAll(gui_id, handle) Clear all rows.

Selection and Metadata

Property Type Notes
GUI_OBJPROP_DROPDOWN_SEL int Selected index; -1 = none.
GUI_OBJPROP_DROPDOWN_COUNT int Row count.
GUI_OBJPROP_DROPDOWN_ITEM string Read only — use prop_index as row index.
GUI_OBJPROP_DROPDOWN_PLACEHOLDER string Closed-field hint when sel is -1.

Per-Row List Appearance

bool guiSetDropDownItemStyle(int gui_id, int handle, int index, int style_flags);
bool guiSetDropDownItemFontName(int gui_id, int handle, int index, string font_name);
bool guiSetDropDownItemFontSize(int gui_id, int handle, int index, int font_size_pt);
  • style_flags: GUI_TEXT_* bits (same as GUI_OBJPROP_TEXT_STYLE).
  • Empty font_name inherits GUI_OBJPROP_FONT_NAME.
  • font_size_pt <= 0 inherits GUI_OBJPROP_FONT_SIZE.
int dd = guiAdd(gui_id, GUI_OBJ_DROPDOWN, 10, 10, 150, 100);
guiAppendDropDownItem(gui_id, dd, "First");
guiAppendDropDownItem(gui_id, dd, "Second");
guiSetDropDownItemStyle(gui_id, dd, 1, GUI_TEXT_BOLD | GUI_TEXT_ITALIC);
string row0 = guiObjectGetString(gui_id, dd, GUI_OBJPROP_DROPDOWN_ITEM, 0);