Board index » cppbuilder » Buttons color

Buttons color


2003-09-19 10:12:01 PM
cppbuilder40
Is it possible to change color of buttons (TButton, TBitBtn) in BCB6 ?
Thank you in advance,
Tanya
 
 

Re:Buttons color

"Tanya" < XXXX@XXXXX.COM >wrote in message
Quote
Is it possible to change color of buttons (TButton, TBitBtn) in BCB6 ?
TButton and TBitBtn, no. TButton is just a wrapper for the Win32 API Button
control, which gets its coloring from the Control Panel settings. TBitBtn
is just an owner-drawn TButton, however it still uses the default coloring
for the areas not occupied by the Glyph. To change TBitBtn's coloring, you
would have to subclass the button and handle all of the drawing manually.
Gambit
 

Re:Buttons color

You can use this button that I developed and add a focus rectangle around it
www.geocities.com/rodolfofrino/SGColorSpeedButton.html
and also the method associated with the behaviour that you want for the
focus rect.
It is the easiest and most powerful method there is.
Rodolfo
"Tanya" < XXXX@XXXXX.COM >wrote in message
Quote
Is it possible to change color of buttons (TButton, TBitBtn) in BCB6 ?

Thank you in advance,
Tanya

 

{smallsort}

Re:Buttons color

You can also simulate a button using a panel. Experiment with the border
properties for normal view and onClick to give the impression of the button
being depressed. You can also change the button caption colors etc by using
a label, but you will also have to set the onClick events for the Label as
well as the panel so that it all works if your cursor is over the Label.
"Tanya" < XXXX@XXXXX.COM >wrote in message
Quote
Is it possible to change color of buttons (TButton, TBitBtn) in BCB6 ?

Thank you in advance,
Tanya