views:

188

answers:

0

I need to intercept ToolStrip Button click and cancel (break executing ButtonClick event).
All need to do from ToolStrip class level.

I've tried:

ToolStrip.ItemClicked( object sender, ToolStripItemClickedEventArgs e )

But [e] argument has no cancel property (only reference to ClickedItem), so I tried:

if (condition) 
          e.ClickedItem.Enabled = false;

But it still continues executing method assigned to ToolStripButton.Click... Is it feasible to archive that??

(Again, please note I want to do that from ToolStrip's code - not from ToolStripButton - where it would be quite easy obviously...)