I created buttons in my coding. 100 buttons.... Each one`s name is "Button" and the row code and then the column code... I wrote a procedure that is used by the OnClick event of those buttons. Now I want to get the name of the specific one I clicked on and the use that name to change only that button`s color. Help please?
Peppercat101
0
Newbie Poster
Recommended Answers
Jump to PostIn the OnClick event there's Sender. That refers to the clicked button, so you can use
TButton(Self).Color := clYellow;
Jump to PostHave you placed the code from pritaeas in your MyButtonClick method?
All 7 Replies
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
Peppercat101
0
Newbie Poster
jsosnowski
1
Junior Poster in Training
Peppercat101
0
Newbie Poster
Peppercat101
0
Newbie Poster
jsosnowski
1
Junior Poster in Training
johnybe
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.