Recent

Author Topic: TScrollBox: scrollbars issue  (Read 4012 times)

VTwin

  • Hero Member
  • *****
  • Posts: 787
  • Former Turbo Pascal 3 user
Re: TScrollBox: scrollbars issue
« Reply #15 on: August 31, 2019, 09:01:33 pm »
Are you sure this is not just Mac functionality?

In Firefox, Messages, the Finder, or iTunes, for example, the scrollbar "thumbs" are not visible unless actively scrolling.

You can not see or grab the thumb until you scroll. If you stop, they disappear. I hate it, but it seems to be expected behavior.
« Last Edit: August 31, 2019, 09:07:18 pm by VTwin »
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0 (2.0.7) fixes svn 62148 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.6 (64 bit on VBox)
fpc 3.0.4

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2282
    • havefunsoft.com
Re: TScrollBox: scrollbars issue
« Reply #16 on: August 31, 2019, 09:21:38 pm »
You can not see or grab the thumb until you scroll. If you stop, they disappear. I hate it, but it seems to be expected behavior.
The term "hate" suggests that you need to know - this behavior is configurable.

"System Preferences" -> "General" -> "Show Scroll Bars" -> "Always"
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

VTwin

  • Hero Member
  • *****
  • Posts: 787
  • Former Turbo Pascal 3 user
Re: TScrollBox: scrollbars issue
« Reply #17 on: August 31, 2019, 10:00:54 pm »
:D Thanks.
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0 (2.0.7) fixes svn 62148 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.6 (64 bit on VBox)
fpc 3.0.4

MISV

  • Hero Member
  • *****
  • Posts: 633
Re: TScrollBox: scrollbars issue
« Reply #18 on: September 09, 2019, 10:28:14 pm »
Are you sure this is not just Mac functionality?

In Firefox, Messages, the Finder, or iTunes, for example, the scrollbar "thumbs" are not visible unless actively scrolling.

You can not see or grab the thumb until you scroll. If you stop, they disappear. I hate it, but it seems to be expected behavior.

Yes, because it is impossible for me to scroll the content into view. The scrollbar shows, I just can't scroll it far enough. I am sorry for my slow feedback on this. But it is not forgotten. I have some bug reports open and I intend to return to them with examples as soon as possible, so you can reproduce. I understand that is a required #1 step :)

cobata

  • New Member
  • *
  • Posts: 47
  • Programmer-analyst
    • COBATA Software - Research, Development, Testing, Consulting
Re: TScrollBox: scrollbars issue
« Reply #19 on: October 18, 2019, 12:34:58 pm »
I just would like to note that Dmitry is already fixed the problem I reported in Mantis and I pointed here (time ago):
https://bugs.freepascal.org/view.php?id=33988
« Last Edit: October 21, 2019, 12:42:10 pm by cobata »
COBATA Software - Research, Development, Testing, Consulting
http://www.COBATA.com/

MISV

  • Hero Member
  • *****
  • Posts: 633
Re: TScrollBox: scrollbars issue
« Reply #20 on: October 18, 2019, 01:54:33 pm »
I am playing with it today.

I have this construct many places

TPageControl (this may be nested under other controls, align alClient) > TTabSheet

In this I have
- TScrollBox(align alClient)

In scrollbox I then have
- TPanel (align AlTop)

That is the most simple construct. I am wondering if my problems (if you do not experience them) are related to TPageControl/TTabSheet and many nested controls. Still hard to understand how the scrollbox miscalculates its own area

... A really corny "fix" seems to be iterate all controls and then:

Code: Pascal  [Select]
  1.    
  2.    if
  3.       (AControl is TPanel)
  4.     and
  5.       ( (AControl.Top = 0) and (AControl.Align = alTop) )
  6.     and
  7.       (AControl.Parent is TScrollBox)
  8.     and
  9.       ( (AControl.Parent.Parent is TTabSheet) or (AControl.Parent.Parent is TPanel) )
  10.     then
  11.       begin
  12.         AControl.Height := AControl.Height + 65;
  13.       end
  14.     ;
  15.