Recent

Author Topic: Height of Cocoa Buttons  (Read 2490 times)

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Height of Cocoa Buttons
« on: November 01, 2018, 08:23:06 am »
Standard, TButton - I'm finding, using Cocoa, they have a predefined and unalterable height.

Set them in Object Inspector (using, I admit, a 32bit Carbon IDE) and they can be any size you want but as soon as you run the app, they reduce down to, maybe, 22 to 24.

Try and alter height programmatically, no go but they move vertically .... Very strange.

Is this something intrinsic in Cocoa or is it a bug ?

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Height of Cocoa Buttons
« Reply #1 on: November 01, 2018, 10:21:37 am »
Hi Davo,


This is a Cocoa limitation. I ran into this "issue" as well, and Dmitry was kind enough to explain it to me.
If you try to make a taller button in XCode, you'll see this limitation there as well.
My work around is using BGRAControls, when I need bigger buttons.

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Height of Cocoa Buttons
« Reply #2 on: November 01, 2018, 12:22:17 pm »
Thanks Hans, I was wondering if that was the case.

Even TBitButton seems to work as we'd expect so its an easy fix I guess. But I needed to be sure in case there really was something there that needed reporting.

Thank You !
Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Height of Cocoa Buttons
« Reply #3 on: November 01, 2018, 03:24:05 pm »
Glad I could help  :)

 

TinyPortal © 2005-2018