Skip to content

Invisible Scrollbar / Scrollbar visibility? #9548

Open

Description

@glaytondf

Version/Branch of Dear ImGui:

Version 1.92.2, Branch: docking

Back-ends:

imgui_impl_win32.cpp + imgui_impl_dx11.cpp

Compiler, OS:

Windows11 MSVC 2022

Full config/build information:

Is it possible to replicate the scrolling behavior shown in the attached video?
Specifically, where the scrollbar only appears when the mouse hovers over its area, and it does not occupy its own dedicated space but instead overlays the content of the last column.

2026-09-18.11-52-00.mp4

Details:

My Issue/Question:

XXX (please provide as much context as possible)

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

// Here's some code anyone can copy and paste to reproduce your issue
ImGui::Begin("Example Bug");
MoreCodeToExplainMyIssue();
ImGui::End();

Activity

  1. changed the title [-]Table scroll[/-] [+]Scrollbar visibility[/+] on Sep 18, 2026
  2. changed the title [-]Scrollbar visibility[/-] [+]Invisible Scrollbar / Scrollbar visibility?[/+] on Sep 18, 2026
  3. ocornut commented on Sep 18, 2026

    @ocornut
    Owner

    No, this is not supported.

    My issue with implementing it is the following:

    It does indeed prevent a whole category of problems (feedback loop between contents sizes and scrollbar visibility, e.g. #8488, #3285).
    If it is exposed as a Style option, it raises the issue that we'd have a Style option can hide a whole category of problems, and then code written somewhere might break elsewhere if the style is different because it wasn't checked for feedback loop issues. That doesn't seem desirable for a healthy code sharing ecosystem.

    So my gut feeling is that the only possible move would be to enforce a scheme everywhere where scrollbar visibility does not alter layout, which could be a choice between invisible and appearing over contents (as in your video), invisible and appearing next to contents (would work if thin enough). That's not a change I would make casually. Especially considering that technical profile/users tend to dislike non-visible scrollbars.

  4. tope99 commented on Sep 20, 2026

    @tope99

    There is a way how to achieve something similar. Set scrollbar size to zero: ImGui::PushStyleVar(ImGuiStyleVar_ScrollbarSize, 0). Then upon mouse dragging reset window->ScrollbarSize and draw it again using ImGui::Scrollbar. ImRAD generates the required code when scrollWhenDragging table property is set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions