ContextMenu on a ToolStripMenuItem
-
I have a MenuStrip with a number of ToolStripMenuItems I'm trying to show a context menu when they are right-clicked so on the MouseUp-event I add
private void presetItem_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
presetMenu.Show(Cursor.Position);
}
}This works but the menu I right-clicked closes when the context-menu shows up. Can I prevent the menu from closing somehow?
http://johanmartensson.se - Home of MPEG4Watcher
-
I have a MenuStrip with a number of ToolStripMenuItems I'm trying to show a context menu when they are right-clicked so on the MouseUp-event I add
private void presetItem_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
presetMenu.Show(Cursor.Position);
}
}This works but the menu I right-clicked closes when the context-menu shows up. Can I prevent the menu from closing somehow?
http://johanmartensson.se - Home of MPEG4Watcher
That's default behavior. i think you need to make your own control that derives from ToolStrimMenuItem and in that override accordingly
-
That's default behavior. i think you need to make your own control that derives from ToolStrimMenuItem and in that override accordingly
Ok, Thanks... I will try and come with something
http://johanmartensson.se - Home of MPEG4Watcher