I am using the toolStripMenu in my C#.net windows application.
I have added one ToolStripSplitButton in toolStripMenu,
this button is having its click event implemented and having 2 items
fist is “Save” second is “Delete” and Click event implemented for both items.
when I run the application and click on toolStripMenu button drop-down icon (triangular icon to get its child item) the ToolStripSplitButton
I suppose it should be fire only when i click on toolstrip button not on its drop down icon.
Please suggest me how can I handle it.
Try this:
The ToolStripSplitButton has two click handlers. One is called “Click” and the other is called “ButtonClick”. The
clickEventHandlerin this constructornew ToolStripSplitButton("Save", "path to Save image", clickEventHandler)is the “Click” handler and fires no matter where on the control you click. The “ButtonClick” handler only fires when you click the button itself, not the drop down icon.