all groups > dotnet windows forms > may 2006 >
You're in the

dotnet windows forms

group:

Disable a Menu Item - Should be Simple???


Disable a Menu Item - Should be Simple??? porko
5/19/2006 7:16:02 AM
dotnet windows forms:
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?




Re: Disable a Menu Item - Should be Simple??? porko
5/19/2006 7:49:02 AM
Well, the handler I have attached to that menu item gets called when I click
on it.

?

[quoted text, click to view]
Re: Disable a Menu Item - Should be Simple??? Mehdi
5/19/2006 3:37:49 PM
[quoted text, click to view]

It sounds like pauseToolStripMenuItem is not the actual menu item displayed
AddThis Social Bookmark Button