Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting button font color 1

Status
Not open for further replies.

RSieffert

Programmer
Oct 10, 2002
8
US
Why doesn't the following change the button's color when the button is clicked?

procedure TfrmStart.Button1Click(Sender: TObject);
begin
(Sender as TButton).Font.Color := clRed;
end;
 
it looks like a tbuttons font color cant be changed from black..

use a TBitBtn
 
Your suggestion of using TBitBtn will solve the problem. I wonder why it doesn't work on TButton? Bug in Delphi?
 
I think delphi just puts a wrapper on the windows object.
 
>I wonder why it doesn't work on TButton? Bug in Delphi?

I have noticed this about Delphi all along. If it is a bug Borland doesn't appear to want to do anuthing about it.

>Your suggestion of using TBitBtn will solve the problem.
Correct! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top