[Lazarus] TScrollBar's PageSize behaviour differs between widgetsets

Kostas Michalopoulos badsectoracula at gmail.com
Sat Mar 19 03:36:57 CET 2011


Hi all,

I just tried my LazHelp package (see my other message) under
Linux/GTK+ 2 using a build i just made from svn. I noticed that the
scrollbar thumb size looks smaller than what it should be, which was
exactly the same issue i had with the Mac OS X (Carbon) build.
Apparently, the size defined in PageSize is taken in account under the
Win32 widgetset (the range is 0..Max-PageSize) but not under other
widgetsets (range 0..Max). I had noticed the strange behaviour in my
Win32 code (i could scroll past the Max-PageSize position using the
buttons) so i added some extra checks in the code to avoid it, but
thought that it was somehow normal. But after seeing the behaviour in
GTK+ 2 and Carbon (which in my opinion is more logical) i thought that
it might be a bug.

Looking around the bug tracker i found this report:
http://bugs.freepascal.org/view.php?id=16107

which basically confirms what i thought. However it also mentions that
Delphi 7 has the same behaviour like the Win32 one of Lazarus.

So what should be the solution? Will the Win32 behaviour be replicated
to the other toolkits for Delphi compatibility or the (more logical
and easier to implement - not to mention that a patch already exists
in the bug report) behaviour that exists in the other widgetsets will
be moved over to the Win32 one? In any case having the widgetsets
behave in different ways is far from desired.

Personally in the meanwhile i have added an {$IFDEF
WINDOWS}...{$ELSE}...{$ENDIF} temporary fix in my code, but obviously
this shouldn't be promoted to permanent.

Kostas "Bad Sector" Michalopoulos




More information about the Lazarus mailing list