Board index » cppbuilder » COLOR Property for TBurron derived new component

COLOR Property for TBurron derived new component

How to change color of TButton and/or how to add color property to TButton
derived new component ?

Miem Chan
miemc...@yahoo.com.au

 

Re:COLOR Property for TBurron derived new component


TButton does not support user-defined colors, despite it's having a Color
property.  It simply inherits that from higher up the VCL hierarchy in a
base class.  TButton gets its actual color from the OS itself based on the
system settings only.

You'll have to either use a TPanel where you manually manipulate the Bevel
properties, or else derive from TCustomControl or TGraphicControl and
override the inherited Paint() method so you can draw the button behavior
yourself, or else find a third-party button that supports color (have a look
at www.torry.net to get your started)

Gambit

Quote
"Miem Chan" <miemc...@yahoo.com> wrote in message news:3cde702c_2@dnews...
> How to change color of TButton and/or how to add color property
> to TButton derived new component ?

Other Threads