Windows Develop Bookmark and Share   
 index > Windows Forms General > ToolStripControlHost - double click event in designer doesn't happen
 

ToolStripControlHost - double click event in designer doesn't happen

if you add a item from the following code to a MenuStrip and double click it, nothing happens.

i'm trying to achieve, like any standart button/toolstripitem, if you double click it, the designer automaticly add a click even to your code.

but this doesn't.

#region ToolStripMenuButton

[ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.All)]
//Declare a class that inherits from ToolStripControlHost.
public class ToolStripMenuButton : ToolStripControlHost
{
public ToolStripMenuButton() : base(new Button())
{

}

public Button ToolStripMenuButtonControl
{
get
{
return Control as Button;
}
}
}

#endregion
Natural_D  Saturday, September 26, 2009 2:24 PM
It works fine when I try it. Can't think of a reason why it wouldn't work for you.

Hans Passant.
  • Marked As Answer byNatural_D Saturday, September 26, 2009 7:22 PM
  •  
nobugz  Saturday, September 26, 2009 3:39 PM
It works fine when I try it. Can't think of a reason why it wouldn't work for you.

Hans Passant.
  • Marked As Answer byNatural_D Saturday, September 26, 2009 7:22 PM
  •  
nobugz  Saturday, September 26, 2009 3:39 PM

You can use google to search for other answers

Custom Search

More Threads

• Ribbon on Windows Forms
• Partial Underline of Text
• C# windows form problem
• Create a zoom in and zoom Out effect in listview
• How to load applications Inside another
• major help with winform control
• One Crystal Report Viewer - several reports?
• Calendar Control DataChanged Event firing every 2 minutes
• Hiding column in datagrid
• Progress Bar