In the OnClick event there's Sender. That refers to the clicked button, so you can use
TButton(Self).Color := clYellow;
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 874
Have you placed the code from pritaeas in your MyButtonClick method?
jsosnowski
Junior Poster in Training
68 posts since Nov 2007
Reputation Points: 11
Solved Threads: 11
I do not understand your last statement. The Caption is the label that appears on the button. The name is the code name used to refer to the button. They can be the same or differ as you choose.
jsosnowski
Junior Poster in Training
68 posts since Nov 2007
Reputation Points: 11
Solved Threads: 11