Solved

Menu Items

Posted on 2002-07-19
1
192 Views
Last Modified: 2010-05-18
Hello

I have runt-time designed MainMenu.
And there are a few items with the same OnClick event handler.

How can I get the Name or the MenuIndex of the selected menu item when the user clicks one of these menu items?

Thaks.
     
0
Comment
Question by:pmarkov
1 Comment
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
ID: 7164151
if (sender is TMenuItem) then
  If TMenuItem(Sender).Name = 'xyz' then  //or another property
....

meikl ;-)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

820 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