mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-12 15:59:54 +02:00
Better documented the difference between BeginListBox() and BeginChild() w/ ImGuiChildFlags_FrameStyle.
BeginListBox() can't yet expose child flags because coarse clipping require query of stored size (same issue as with adding resize support to Tables).
This commit is contained in:
@ -1250,6 +1250,9 @@ static void ShowDemoWindowWidgets()
|
||||
IMGUI_DEMO_MARKER("Widgets/List Boxes");
|
||||
if (ImGui::TreeNode("List boxes"))
|
||||
{
|
||||
// BeginListBox() is essentially a thin wrapper to using BeginChild()/EndChild() with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label.
|
||||
// You may be tempted to simply use BeginChild() directly, however note that BeginChild() requires EndChild() to always be called (inconsistent with BeginListBox()/EndListBox()).
|
||||
|
||||
// Using the generic BeginListBox() API, you have full control over how to display the combo contents.
|
||||
// (your selection data could be an index, a pointer to the object, an id for the object, a flag intrusively
|
||||
// stored in the object itself, etc.)
|
||||
|
Reference in New Issue
Block a user