Combo Box Widgets
Combo boxes allow selecting one item from a dropdown list.BeginCombo
BeginCombo()/EndCombo() API allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items.
const char*
Combo box label
const char*
Preview text displayed when combo is closed
ImGuiComboFlags
default:"0"
Combo flags (see ImGuiComboFlags_)
bool
True when combo is open (you can output to it)
EndCombo
EndCombo() if BeginCombo() returns true.
Combo (array)
BeginCombo()/EndCombo().
const char*
Combo box label
int*
Pointer to current selected item index
const char* const[]
Array of item strings
int
Number of items in array
int
default:"-1"
Maximum height of popup in items (-1 = default)
bool
True when selection has been modified
Combo (separated string)
\0 within a string. End item-list with \0\0. E.g. "One\0Two\0Three\0"
const char*
Combo box label
int*
Pointer to current selected item index
const char*
String with items separated by \0
int
default:"-1"
Maximum height of popup in items
bool
True when selection has been modified
Combo (callback)
const char*
Combo box label
int*
Pointer to current selected item index
const char* (*)(void*, int)
Callback function to get item string by index
void*
User data passed to callback
int
Number of items
int
default:"-1"
Maximum height of popup in items
bool
True when selection has been modified
Combo Flags
ImGuiComboFlags_
Flags forBeginCombo().