Forum > General
Accessing TPanel properties from a TButton "OnClick" event.
(1/1)
Curt Carpenter:
I suspect this is a very basic question. I have a TButton placed on a TPanel on my TForm. When I click on the button and generate a OnClick event, I want to access the tag number I've assigned of the TPanel that contains the button. Can anyone tell me how to do this?
jamie:
Sure.
In your OnClick even you can do this.
TButton(Sender).Parent.Tag
of course it's a good idea to test sender to ensure it's valid, first.
If Sender is TButton Then TButton(Sender).Parent.Tag
etc.
Curt Carpenter:
THANK YOU!!! :)
Navigation
[0] Message Index