Click here to Skip to main content
15,879,096 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm working on a C# winForm project that use a contextMenuStrip. I'm trying to figure out how to disable/override default behavior of allowing only one toolStripMenuItem at a time for selection. I've been working at this for the last 2 days and I'm making 0 progress.

Does anyone know of any links or how to do this?

Thanks in advance, -DA
Posted

1 solution

Mhm... maybe if you try to catch the Closing Event with something like
C#
private void _Context_Closing(object sender, ToolStripDropDownClosingEventArgs e) {
  if (e.CloseReason == ToolStripDropDownReason.ItemClicked) {
    e.Cancel = true;

    //some magic here...
  }
}
 
Share this answer
 
Comments
d.allen101 20-Jun-13 14:29pm    
yeah you're right, that's where the magic begins lol!
StM0n 20-Jun-13 14:30pm    
glad to help :)
d.allen101 20-Jun-13 14:32pm    
my fault for not saying thank you. Thx alot!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900