Disabling a ToolStripMenuItem (bug, maybe?)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SetonSoftware

    Disabling a ToolStripMenuItem (bug, maybe?)

    I have a MenuStrip item on a form and am trying to disable a
    ToolStripMenuIt em on the dropdown portion. I'm using the following
    code to test and when I run it in Form_load the caption changes to
    Disabled, the item is disabled, but the color does not change to light
    gray so as to indicate to a user that the item is unavailable.

    mnuOpen.Text = "Disabled"
    mnuOpen.Enabled = False

    When I go to my display properties and change the Windows and Buttons
    option to Windows XP it all works just fine, However, I need to keep
    the Windows Classic Style and it is here that the problem occurs. I
    tried setting the ForeColor manually to Color.Gray but it still
    doesn't display.

    What's really wierd is that if I change to Windows XP and then back to
    Classic it works the first few times and then stops. The item that was
    once gray suddenly appears in black. Has anyone seen this before? Is
    there a bug in the ToolStripMenuIt em?

    Thanks

    Carl
Working...