MenuItem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Creating an enhanced menuItem with additional properties is easy to do. Is
there also a way to enhance the menuItem by adding an event to it?

I would like to have the MenuItem display a help message if it is right
clicked but I cannot find a way to detect the right click mouse event.

Can this be done and, if so, can you point me to a reference source?
 
To detect a right mouse click you service the click event and then see which
button was clicked by examining the event arguments passed in. At this point
you can raise your own custom event (RightClick perhaps).

Creating your own event is a simple process. Unfortunately, creating a
custom menu item that is recognized by the designer isn't. All your custom
menu items will have to be edited by hand.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
Creating your own event is a simple process. Unfortunately, creating a
custom menu item that is recognized by the designer isn't. All your custom
menu items will have to be edited by hand.

An alternative is to create an extender, such as the example on my site
which Adds a Tag property to standard MenuItems and also adds a handler to
the Click event so that RadioGrouped menuitems are autochecked.

http://www.dotnetrix.co.uk/menus.html --> Create an Extender Component to
add a Tag property to MenuItems.
 
Back
Top