light_bulb
asked on
Sender Name in onClick Event
I have an onClick event that several components use. One of them is causing a problem, but I can't tell how to figure out which one is the problem.
I can't do ShowMessage(Sender.name) inside the onClick event.
How can I tell the name of the component?
Thanks,
I can't do ShowMessage(Sender.name) inside the onClick event.
How can I tell the name of the component?
Thanks,
ASKER
Is there no way to do it in Delphi without have to install/buy 3rd party utils?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I did the following, since I have several different types of components, but you led me in the right direction:
ShowMessage((Sender as TControl).Name);
ShowMessage((Sender as TControl).Name);
i`m glad i could help you :D
you could use someting like :
CodeSite > http://www.raize.com/DevTools/CodeSite/Default.asp
or
SmartInspect > http://www.gurock.com/products/smartinspect/