Menu

#623 TScroller scroll bars behave erratically

8
open
nobody
GUI (77)
1
2025-10-20
2025-07-30
No

TScroller does not update the scroll bars reliably when the scroll range is changed.

For example, TCoolEdit will not display the vertical scroller when the number of text lines exceeds the number of the visible lines. Only after resizing the window the scrollbar will appear. When opening a file that doesn't fit into the window, the scroller is displayed.

To reproduce open a new edit window and type Enter until the cursor reaches the end of the window.

Related

Bugs: #615
Feature Requests: #266

Discussion

  • Erwin Lotter

    Erwin Lotter - 2025-08-04

    Although AdjustScroller() is called when a line is added, the scrollbar will not appear even if Scroller->SetRange applies an yRange well beyond the number of sreen lines.
    The problem is not related to TCoolScroller, it also occurs with TScroller.

     
    👍
    1

    Last edit: Erwin Lotter 2025-08-04
  • Erwin Lotter

    Erwin Lotter - 2025-10-14

    This issue has been fixed in branches/elotter-cooledit by [r8524].
    In fact, the fix is more of a workaround than a solution and could indicate that there is an issue with the underlying scroller handling.

     
    👍
    1

    Related

    Commit: [r8524]

  • Vidar Hasfjord

    Vidar Hasfjord - 2025-10-14
    • labels: --> GUI
    • summary: TCoolEdit not displaying the vertical scrollbar --> TScroller scroll bars behave erratically
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,2 +1,5 @@
    -TCoolEdit will not display the vertical scroller when the number of text lines exceeds the number of the visible lines. Only after resizing the window the scrollbar will appear. When opening a file that doesn't fit into the window, the scroller is displayed.
    +TScroller does not update the scroll bars reliably when the scroll range is changed.
    +
    +For example, TCoolEdit will not display the vertical scroller when the number of text lines exceeds the number of the visible lines. Only after resizing the window the scrollbar will appear. When opening a file that doesn't fit into the window, the scroller is displayed.
    +
     To reproduce open a new edit window and type Enter until the cursor reaches the end of the window.
    
    • Group: unspecified --> 8
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2025-10-14

    Thanks for creating the ticket and looking into this. I ran into the same problem on the trunk. At some point I had some elaborate code trying to circumvent the issue, but I decided to remove it, since it was quite brittle, and I concluded the issue originates in TScroller and should be fixed at source.

    I've updated the ticket title to reflect the source of the problem.

     
  • Erwin Lotter

    Erwin Lotter - 2025-10-20

    On introducing the horizontal scrollbar adjustment new issues appeared.
    I could solve most of them by skipping the Scroller->ShowWindow calls and hiding unnecessary bars by setting the scroll range to zero. The remaining issues are:

    1. If a bar gets activated while the other bar is already visible, its range will be ignored and the maximum range will be applied. Only after resizing the window the bars will be ok.

    2. After the horizontal bar is activated, the scroll range will be too small by approx. two characters. Only after resizing the window the scroller will be ok.

     

Log in to post a comment.

MongoDB Logo MongoDB