Changing the colors of a ToolStripMenuItem in VS2005 Beta 2

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I'm trying to programmatically change the foreground and background
colors of a single ToolStripMenuItem on a ContextMenuStrip in VS2005
Beta 2.

menuMapper.BackColor = Color.Green;
menuMapper.ForeColor = Color.Purple;

The background color doesn't change and the foreground color only
changes when I hover over it. What am I doing wrong?

Thanks

Dave
 
You are not doing wrong it's the way the menu strip works.
The solution is to create your own control that inherit ToolStripMenuItem
and override paint method.
 
Back
Top