Board index » delphi » Need help to change colors in button caption.

Need help to change colors in button caption.

Hi all.

I've got into problems when I tried to change colors in TButton
properties.

I have Delphi 2.0 and win 95.

When I tried to chang font color from black to red, nothing happend. I
tried to set color in the program (button1.font.color := clred;), but
nothing happend. The caption text remained black....

Does anyone have any clue...  

(When using Speedbutton the color changed from black to red..)

Regards Leif M. Svendsen

 

Re:Need help to change colors in button caption.


On Sat, 14 Jun 1997 22:50:33 +0200, Leif Magne Svendsen

Quote
<lmsv...@bvemx.ppco.com> wrote:
>Hi all.

>I've got into problems when I tried to change colors in TButton
>properties.

>I have Delphi 2.0 and win 95.

>When I tried to chang font color from black to red, nothing happend. I
>tried to set color in the program (button1.font.color := clred;), but
>nothing happend. The caption text remained black....

>Does anyone have any clue...  

>(When using Speedbutton the color changed from black to red..)

>Regards Leif M. Svendsen

This is a built-in limitation of the Windows implementation of the
BUTTON window class, the only way to get different colored text would
be to "Owner draw" the buttons. This restriction is (partly) why
Borland came up with the BitButton component; is there some reason you
don't want to use them?

HTH

Stephen Posey
slpo...@concentric.net

Other Threads