Solved

Menu Items

Posted on 2002-07-19
1
189 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now