Context Menus...

JaedenRuiner

Well-known member
Joined
Aug 13, 2007
Messages
340
Programming Experience
10+
Okay

I've noticed an annoying behavior of the Context Menu, or ToolStripContextMenu() class, as i think it is called. Either way, I've got several menus attached to different controls, where I listen to the opening events in order to enable/disable menu items based upon which control they are opening for, etcetera.
However, since I devised my own method for interpreting which item was clicked based upon the Tag property of each menu item, I only have one method: MenuItemClicked() where my MainMenu, and All ContextMenu point their OnItemClicked() event to. The Tag for each item is either nothing, or like FM,1 for file Menu item 1, again, etcetera.

However, I've found that a lot of times, I'll open the menu, find the item i want, and click it, but the menu doesn't disappear. So if my menu item instigates a dialog or something, the menu is often hovering on top of the dialog i just opened and doesn't go away until I've returned from the Open/Save/Browse dialog. I tried putting in a line that utilizes the CloseMenu() method (not sure if that is the actual name, but I do have the right one in my code) or the Hide() method in my ItemClicked() handler, but now a annoying issue comes up when hovering over Sub Menus of the COntextMenu. If there are two Sub Menus, and I allow one to open, when i move to the second sub menu, the whole menu closes and I have to re open the whole menu again, making sure this time to move directly to the sub menu item i want.

Is there any way to flush out some of these menu issues?

Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner
 
Back
Top