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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top