Columns: Fix for explicit content width and scrollbar. (#519, #125)

This commit is contained in:
omar
2017-08-20 21:32:18 +08:00
parent ea493fd8da
commit 54bdd00df7
2 changed files with 4 additions and 4 deletions

View File

@ -1623,13 +1623,13 @@ void ImGui::ShowTestWindow(bool* p_open)
if (ImGui::TreeNode("Horizontal Scrolling"))
{
ImGui::SetNextWindowContentWidth(2000);
ImGui::SetNextWindowContentWidth(1500);
ImGui::BeginChild("##scrollingregion", ImVec2(0, 120), false, ImGuiWindowFlags_HorizontalScrollbar);
ImGui::Columns(10);
for (int i = 0; i < 20; i++)
for (int j = 0; j < 10; j++)
{
ImGui::Text("Line %d Column %d", i, j);
ImGui::Text("Line %d Column %d...", i, j);
ImGui::NextColumn();
}
ImGui::Columns(1);