Table Column select #3918
NotDark
announced in
Old/Archived discussions
Replies: 2 comments
-
There are example in the demo. |
Beta Was this translation helpful? Give feedback.
0 replies
-
In my case, the problem was calling int selected_id = -1;
for( size_t i = 0; i < data_items.size(); i++ ) {
ImGui::TableNextColumn( );
if( ImGui::Selectable( ( "##" + std::to_string( i ) ).c_str(), selected_id == i,
ImGuiSelectableFlags_SpanAllColumns )
) {
selected_id = i;
}
ImGui::SameLine();
ImGui::Text( "First Col" )
ImGui::TableNextColumn( );
ImGui::Text( "Second Col" )
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
how do i make table column selectable
the code above create new row selectable
Beta Was this translation helpful? Give feedback.
All reactions