Skip to content

Wrap demo tab content in BeginChild to keep tabs visible when scrolling#167

Merged
matt-edmondson merged 3 commits into
mainfrom
copilot/wrap-demo-render-in-beginchild
Feb 16, 2026
Merged

Wrap demo tab content in BeginChild to keep tabs visible when scrolling#167
matt-edmondson merged 3 commits into
mainfrom
copilot/wrap-demo-render-in-beginchild

Conversation

Copilot AI commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

Tab bar scrolls out of view when viewing long content in ImGuiAppDemo, making tab navigation difficult at the bottom of pages.

Changes

Modified 14 demo files in examples/ImGuiAppDemo/Demos/ to wrap content in ImGui.BeginChild(), creating an independent scrollable region within each tab while keeping the tab bar fixed.

Pattern applied:

public void Render()
{
    if (ImGui.BeginTabItem(TabName))
    {
        if (ImGui.BeginChild("##content"))
        {
            // Content scrolls here
        }
        ImGui.EndChild();
        
        ImGui.EndTabItem();
    }
}

Files modified:

  • BasicWidgetsDemo.cs
  • AdvancedWidgetsDemo.cs
  • AnimationDemo.cs
  • CleanImNodesDemo.cs
  • DataVisualizationDemo.cs
  • GraphicsDemo.cs
  • ImGuizmoDemo.cs
  • ImNodesDemo.cs
  • ImPlotDemo.cs
  • InputHandlingDemo.cs
  • LayoutDemo.cs
  • NerdFontDemo.cs
  • UnicodeDemo.cs
  • UtilityDemo.cs

Also fixed typo in ImGuizmoDemo separator text.

Original prompt

This section details on the original issue you should resolve

<issue_title>Wrap demo.Render() in BeginChild()</issue_title>
<issue_description>Consider adding this to a BeginChild so the tabs are always visible, even when scrolled down the page so you can switch tab when you get to the end of the content?

Originally posted by @Damon3000s in #132 (comment)
</issue_description>

Comments on the Issue (you are @copilot in this section)

@matt-edmondson @copilot is this still required?

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 16, 2026 01:17
…ling

Co-authored-by: matt-edmondson <19528727+matt-edmondson@users.noreply.github.com>
Co-authored-by: matt-edmondson <19528727+matt-edmondson@users.noreply.github.com>
Copilot AI changed the title [WIP] Wrap demo.Render() in BeginChild for tab visibility Wrap demo tab content in BeginChild to keep tabs visible when scrolling Feb 16, 2026
Copilot AI requested a review from matt-edmondson February 16, 2026 01:24
@matt-edmondson
matt-edmondson marked this pull request as ready for review February 16, 2026 01:25
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
22 Security Hotspots
0.0% Coverage on New Code (required ≥ 80%)
C Security Rating on New Code (required ≥ A)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@matt-edmondson
matt-edmondson merged commit 25fdd71 into main Feb 16, 2026
4 of 5 checks passed
@matt-edmondson
matt-edmondson deleted the copilot/wrap-demo-render-in-beginchild branch May 29, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrap demo.Render() in BeginChild()

2 participants