-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Closed
Labels
label/id and id stackimplicit identifiers, pushid(), id stackimplicit identifiers, pushid(), id stack
Description
Hi,
While creating a table I noticed that if the labels of more than one Selectable are the same
then the selection does not work.
Here's an example that show the issue
#define SHOW_ISSUE 1
static bool windowOpen = true;
ImGui::Begin("test",&windowOpen);
ImGui::Columns(1);
char buffer[10];
static int selected = 0;
for (int i = 0; i <3; ++i)
{
#if SHOW_ISSUE
sprintf(buffer, "test");
#else
sprintf(buffer, "%d", i);
#endif
if (ImGui::Selectable(buffer, i == selected, ImGuiSelectableFlags_SpanAllColumns))
selected = i;
}
ImGui::End();
Is there a way to make the selection work on multiple rows with same text?
Thank you,
Matteo
Metadata
Metadata
Assignees
Labels
label/id and id stackimplicit identifiers, pushid(), id stackimplicit identifiers, pushid(), id stack