Recent

Author Topic: Making a new button component that looks like the TComboBox button  (Read 2043 times)

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Lazarus 1.8 RC3
macOS 10.12.5 Sierra

Hello, I would like to make a new button component which looks just like the button in a TComboBox control. I've experimented with overriding the PaintBackground method in a TSpeedButton descendent but can't seem to fill the entire button area. I suspect the answer may lie in overriding the underlying widget set behaviour, but all my component experience is with Delphi and Windows so I don't want to go down the wrong route and waste lots of time. Can anyone help here?

Thanks,
Carl
« Last Edit: July 09, 2017, 09:56:46 pm by carl_caulkett »
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Re: Making a new button component that looks like the TComboBox button
« Reply #1 on: July 09, 2017, 11:03:43 pm »
My understanding is that Lazarus on the Mac defaults to using the Carbon widget set, and indeed, I've found references to classes such as TCarbonButton and TCarbonBitbtn, so maybe this may help me.

On the other hand, I have also heard it said, mainly from Phil Hess, that eventually Carbon is going to be superseded by the Cocoa widget set. I am naturally wary of painting myself into a corner by adopting the wrong technology, so I would welcome anyone's opinions on these issues...

Thanks in advance,
Carl
« Last Edit: July 09, 2017, 11:42:57 pm by carl_caulkett »
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

 

TinyPortal © 2005-2018