PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms ContextMenuStrip within another ToolStrip

Reply

ContextMenuStrip within another ToolStrip

 
Thread Tools Rate Thread
Old 04-01-2007, 03:11 AM   #1
Brian Erst
Guest
 
Posts: n/a
Default ContextMenuStrip within another ToolStrip


Does anyone know how to add a context menu to another menu?

I have a menu (ToolStripDropDownButton.DropDownItems) that gets
automatically populated by reading data from a configuration source. I
want the users to be able to remove items from that menu by
right-clicking on the menu item and selecting "Delete" from a context
menu.

As ToolStripItem (or ToolStripMenuItem) is not a Control, you cannot
associate a ContextMenuStrip with a tool strip item. I have searched in
vain trying to come up with a method to do this.

Microsoft uses this method itself (for instance, you can right-click
any menu item in the "Start" Menu and pop up a context menu for that
item), but that doesn't necessarily mean that .Net supports it.

If anyone has figured out how to do this, I'd appreciate a pointer.
Thanks!

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off