Recent

Author Topic: Problem with TScrollBox in OSX (Lion)  (Read 5791 times)

JimKueneman

  • Full Member
  • ***
  • Posts: 191
Problem with TScrollBox in OSX (Lion)
« on: March 31, 2013, 12:34:09 am »
Can someone help me find where to look to fix this.  I am creating a bunch of components (TSpeedButtons, TImage) on a TScrollBox.  If the ScrollBox has a horizontal scrollbar several things occur:

1) The move over effect is correct but the Mouse Down to click is off (must click below the button) by the height of the scroll bar.
2) The TImages don't draw right (canvas offset problem?)

Thanks,
Jim

JimKueneman

  • Full Member
  • ***
  • Posts: 191
Re: Problem with TScrollBox in OSX (Lion)
« Reply #1 on: March 31, 2013, 12:36:38 am »
Edit:

   It is not off by the scrollbar height, it is off by a percentage of how far the vertical scrollbar is scrolled down, but only if the horizontal scrollbar is visible.

Jim
« Last Edit: March 31, 2013, 01:41:50 am by JimKueneman »

JimKueneman

  • Full Member
  • ***
  • Posts: 191
Re: Problem with TScrollBox in OSX (Lion)
« Reply #2 on: April 14, 2013, 11:13:25 pm »
Is there a better place to post this for a OS specific issue?

Jim

jwdietrich

  • Hero Member
  • *****
  • Posts: 1198
    • formatio reticularis
Re: Problem with TScrollBox in OSX (Lion)
« Reply #3 on: April 15, 2013, 12:15:08 am »
I cannot reproduce your problem here (Lazarus 1.0.8, Mac OS X 10.5 Leopard, PPC Mac).

Maybe that I omitted some setting that you used in your project. Could you perhaps post a link to a short demo project for checking?

Which version of Lazarus and FPC did you use?
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.12 | FPC 3.2.0 | PPC, Intel, ARM | macOS, Windows, Linux

JimKueneman

  • Full Member
  • ***
  • Posts: 191
Re: Problem with TScrollBox in OSX (Lion)
« Reply #4 on: April 15, 2013, 01:43:15 am »
Just so you don't think I am crazy:

www.mustangpeak.net/TScrollBox_TSpeedButton_Bug.mpg

This was FPC 2.6.0, Lazarus 1.04

Just installed FPC 2.6.2 and Lazarus 1.08 with the same results.

JIm

JimKueneman

  • Full Member
  • ***
  • Posts: 191
Re: Problem with TScrollBox in OSX (Lion)
« Reply #5 on: April 15, 2013, 02:00:58 am »
Ok easy to reproduce

www.mustangpeak.net/LazarusBug.zip

TScrollbox does not recognize _anything_ about TSpeedButton.

If you only create TSpeedButtons the vertical scrollbar is not shown in the TScrollbox. 

Uncomment out the addition of TLabels to force a vertical scrollbar and scroll down.  You can't click on the TSpeedbutton but have to click some pixels below it.

Jim

jwdietrich

  • Hero Member
  • *****
  • Posts: 1198
    • formatio reticularis
Re: Problem with TScrollBox in OSX (Lion)
« Reply #6 on: April 15, 2013, 08:18:55 pm »
You are right, now I can reproduce your problem, although my environment is slightly different from yours (Lazarus 1.0.8, FPC 2.6.2, Mac OS X 10.5 on a PPC-based PowerMac G5). The offset only arises, if the ScrollBox is scrolled down, as you described.

I recommend to submit a bug report at http://bugs.freepascal.org. There is a number of issues that have been reported for TScrollBox, but obviously not this one.

EDIT: Please also specify the link to your example project from above in order to support the isolation of the bug.
« Last Edit: April 15, 2013, 08:20:52 pm by jwdietrich »
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.12 | FPC 3.2.0 | PPC, Intel, ARM | macOS, Windows, Linux

JimKueneman

  • Full Member
  • ***
  • Posts: 191
Re: Problem with TScrollBox in OSX (Lion)
« Reply #7 on: April 16, 2013, 03:56:29 am »
Done ID 0024279

Jim

zeljko

  • Hero Member
  • *****
  • Posts: 1334
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Problem with TScrollBox in OSX (Lion)
« Reply #8 on: April 19, 2013, 02:44:33 pm »
TScrollbox does not recognize _anything_ about TSpeedButton.

If you only create TSpeedButtons the vertical scrollbar is not shown in the TScrollbox. 

There's no widgetset which recognizes TSpeedButton since it's TGraphicControl. TSpeedButton does not have ws handle.
I've fixed such scenarios on qt,gtk2 and win32 and didn't know that same issue exist for mac (because I'm using qtlcl on mac).

JimKueneman

  • Full Member
  • ***
  • Posts: 191
Re: Problem with TScrollBox in OSX (Lion)
« Reply #9 on: May 02, 2013, 04:55:53 am »
How did you fix it?

Jim

zeljko

  • Hero Member
  • *****
  • Posts: 1334
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Problem with TScrollBox in OSX (Lion)
« Reply #10 on: May 21, 2013, 09:02:57 pm »
How did you fix it?

Jim

I've fixed that inside widgetsets .... look at changes at lazarus svn in qt and gtk2 ws about scrollbox, and some recent changes in wincontrol.inc

 

TinyPortal © 2005-2018