Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Menu Items

Posted on 2002-07-19
1
Medium Priority
?
200 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 150 total points
ID: 7164151
if (sender is TMenuItem) then
  If TMenuItem(Sender).Name = 'xyz' then  //or another property
....

meikl ;-)
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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 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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Loops Section Overview

963 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