Solved

Sender Name in onClick Event

Posted on 2007-04-10
5
235 Views
Last Modified: 2010-04-05
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,
0
Comment
Question by:light_bulb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 5

Expert Comment

by:xr1140
ID: 18883745

you could use someting like :

CodeSite  > http://www.raize.com/DevTools/CodeSite/Default.asp

or

SmartInspect > http://www.gurock.com/products/smartinspect/
0
 
LVL 3

Author Comment

by:light_bulb
ID: 18883783
Is there no way to do it in Delphi without have to install/buy 3rd party utils?
0
 
LVL 5

Accepted Solution

by:
xr1140 earned 500 total points
ID: 18883844

  ShowMessage( (Sender as _component_type_ ).Name );

change  _component_type_  with your specific component
0
 
LVL 3

Author Comment

by:light_bulb
ID: 18884013
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);
0
 
LVL 5

Expert Comment

by:xr1140
ID: 18884138

i`m glad i could help you :D
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question