Lazarus

Programming => Widgetset => Cocoa => Topic started by: dbannon on June 24, 2021, 01:51:13 pm

Title: TUpDown Orientation
Post by: dbannon on June 24, 2021, 01:51:13 pm
Hi Folks, I use the TUpDown Control in my app and use it with orientation = udHorizontal. Works fine on Linux and Windows, however, on the Mac it remains firmly vertical.

Is this a case of the underlying cocoa widgetset not supporting orientation or should I report it as a bug ?

I can of course use a couple of speedbuttons but the TUpDown seemed to work quite well.....

Davo
Title: Re: TUpDown Orientation
Post by: ChrisR on June 24, 2021, 02:47:07 pm
The LCL TUpDown maps on to the Cocoa NSStepper. This native control appears to only support the vertical up/down. Perhaps this limitation should be noted on the wiki:

https://wiki.freepascal.org/Cocoa_Internals/Widgetset
Title: Re: TUpDown Orientation
Post by: dbannon on June 24, 2021, 03:04:09 pm
Yes, that makes sense Chris, Pity but not that hard to get around.

Davo
Title: Re: TUpDown Orientation
Post by: Bart on June 24, 2021, 06:55:16 pm
It should be noted in issues.xml for cocoa widgetset as well, so please file a bugreport.

Bart
Title: Re: TUpDown Orientation
Post by: skalogryz on June 24, 2021, 08:16:48 pm
It should be noted in issues.xml for cocoa widgetset as well, so please file a bugreport.
is that an issue or a system native behavior ?
Title: Re: TUpDown Orientation
Post by: Bart on June 24, 2021, 10:43:08 pm
It should be noted in issues.xml for cocoa widgetset as well, so please file a bugreport.
is that an issue or a system native behavior ?

If the orientation thing is system native behaviour, then it not being in issues.xml is the bug.
Otherwise the orientation thing is the bug.
Either way, there is a bug.
Hence it should be reprted in the bugtracker (so it won't be forgotten).

B.t.w. I thought that TUpDown was entirely painted by ourself?

Bart
Title: Re: TUpDown Orientation
Post by: skalogryz on June 24, 2021, 11:01:04 pm
B.t.w. I thought that TUpDown was entirely painted by ourself?
yeah, but it doesn't look native on macOS
so additional system native implementation of UpDown was introduced.
Title: Re: TUpDown Orientation
Post by: dbannon on June 25, 2021, 05:43:04 am
OK, here is a comparison -

I'll log it as a bug, at least a documentation change noting orientation change is not available in Cocoa. For my app, very easy to replace with a couple of speedbuttons.

Davo
TinyPortal © 2005-2018