You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Back-ends: example_glfw_opengl3
Compiler: VS 2019
Operating System: Windows 10
My Issue/Question:
When creating several listboxes with the same label, all the elements (including the selection) appears on the first ListBox. For example, in imgui_demo.cpp, line 709:
results in the provided screenshot (the first listbox has the 27 items, and the other two are empty). Using different item lists does not change the result.
Screenshots/Video
Standalone, minimal, complete and verifiable example:(see #2261)
Just replace lines 707-715 in imgui_demo.cpp with:
{
// Using the _simplified_ one-liner ListBox() api here
// See "List boxes" section for examples of how to use the more flexible BeginListBox()/EndListBox() api.
const char* items[] = { "Apple", "Banana", "Cherry", "Kiwi", "Mango", "Orange", "Pineapple", "Strawberry", "Watermelon" };
static int item_current = 1;
ImGui::ListBox("listbox", &item_current, items, IM_ARRAYSIZE(items), 4);
static int item_current1 = 1;
static int item_current2 = 1;
ImGui::ListBox("listbox", &item_current1, items, IM_ARRAYSIZE(items), 4);
ImGui::ListBox("listbox", &item_current2, items, IM_ARRAYSIZE(items), 4);
ImGui::SameLine(); HelpMarker(
"Using the simplified one-liner ListBox API here.\nRefer to the \"List boxes\" section below for an explanation of how to use the more flexible and general BeginListBox/EndListBox API.");
}
The text was updated successfully, but these errors were encountered:
Oh, I see. Totally my fault.
Maybe the parameter should be called label_id or something along those lines to remind the user that it has two uses? Having a parameter named 'label' hides the second (and very important!) use. I'm sure I'm not the first who reports this issue.
By the way, I love the library. Keep up the good work!
Version/Branch of Dear ImGui:
Version: 1.82
Branch: v1.82
Back-end/Renderer/Compiler/OS
Back-ends: example_glfw_opengl3
Compiler: VS 2019
Operating System: Windows 10
My Issue/Question:
When creating several listboxes with the same label, all the elements (including the selection) appears on the first ListBox. For example, in imgui_demo.cpp, line 709:
just creating a couple of listboxes more:
results in the provided screenshot (the first listbox has the 27 items, and the other two are empty). Using different item lists does not change the result.
Screenshots/Video
Standalone, minimal, complete and verifiable example: (see #2261)
Just replace lines 707-715 in imgui_demo.cpp with:
The text was updated successfully, but these errors were encountered: