Disable a Menu Item - Should be Simple???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I long for the old Win32 SDK days...

I'm trying to dynamically enable/disable context menu items, depending on
the state of my application.

In the context menu's "Opening" event, I've got code that looks like this:

pauseToolStripMenuItem.Enabled = false;

It doesn't work. I've tried looking this up on MSDN, Google and all the
sample tell me to just set the Enabled property to this end. I also
experimted with "Visible", and "Available" properties - these also have no
effect at all.

Bizarre.

What could I be doing wrong?
 
I'm trying to dynamically enable/disable context menu items, depending on
the state of my application.

In the context menu's "Opening" event, I've got code that looks like this:

pauseToolStripMenuItem.Enabled = false;

It doesn't work. I've tried looking this up on MSDN, Google and all the
sample tell me to just set the Enabled property to this end. I also
experimted with "Visible", and "Available" properties - these also have no
effect at all.

It sounds like pauseToolStripMenuItem is not the actual menu item displayed
on your context menu
 
Back
Top