467,083 Members | 1,209 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,083 developers. It's quick & easy.

Copying a ToolStripMenuItem

Hi,

I'm implementing a plug-in interface and I want to allow plug-ins to
add menu items to the host application's menu bar. I've given them a
public method that is passed a ToolStripMenuItem but it seems that you
can't /copy/ these things. You can only move them.

At present plug-in developers can add menu items by writing code but
that's a bit unpleasant. What I want is to allow them to implement
their menus using the IDE designer then just have a function to copy
them onto the parent menu. Oh and the copying needs to be on demand so
that the host menu changes as a plug-in gets focus.

Any thoughts?

--

Oct 20 '06 #1
  • viewed: 2476
Share:
1 Reply
Hah! I found it. Typical really after posting here :)

The answer is ToolStripManager.RevertMerge() and
ToolStripManager.Merge(). Slightly obscure but works a treat.

--

Oct 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Maileen | last post: by
2 posts views Thread by genojoe | last post: by
reply views Thread by genojoe | last post: by
1 post views Thread by =?Utf-8?B?RjVGNUY1?= | last post: by
3 posts views Thread by =?Utf-8?B?bGpsZXZlbmQy?= | last post: by
reply views Thread by Dean Slindee | last post: by
3 posts views Thread by Martijn Mulder | last post: by
reply views Thread by kyungdongkim@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.