From d6a5fd06d7003568609042dd1df40b9457bafffb Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 7 Jun 2016 08:46:50 +0200 Subject: [PATCH] Demo: Added an extra 3-way columns demo --- imgui_demo.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index e7487f6b..c890d75a 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -1312,7 +1312,22 @@ void ImGui::ShowTestWindow(bool* p_open) // Basic columns if (ImGui::TreeNode("Basic")) { - ImGui::Columns(4, "mycolumns"); + ImGui::Text("Without border:"); + ImGui::Columns(3, "mycolumns3", false); // 3-ways, no border + ImGui::Separator(); + for (int n = 0; n < 14; n++) + { + char label[32]; + sprintf(label, "Item %d", n); + if (ImGui::Selectable(label)) {} + //if (ImGui::Button(label, ImVec2(-1,0))) {} + ImGui::NextColumn(); + } + ImGui::Columns(1); + ImGui::Separator(); + + ImGui::Text("With border:"); + ImGui::Columns(4, "mycolumns"); // 4-ways, with border ImGui::Separator(); ImGui::Text("ID"); ImGui::NextColumn(); ImGui::Text("Name"); ImGui::NextColumn();