1

Quite an idiot question, however, I wanted to place a custom control on a ToolStrip through a ToolStripControlHost.

var myControl = ...
//...
toolStrip.Items.Insert(0, new ToolStripControlHost(myControl));

But the default coloring differs on ToolStrip items and simple controls. On a ToolStrip they're colored blue when focused, while usual controls are grayed.

So I wanted to try to apply similar colors to my custom control. In particular I use buttons with FlatStyle set to Flat. So I'd love to set MouseOverBackColor to the color used to render a hovered ToolStripButton.

Could anyone say, what that color is? Or how to apply the coloring scheme to a custom control nested into a ToolStripControlHost used to render regular ToolStrip items?

horgh
  • 17,918
  • 22
  • 68
  • 123
  • Use your own renderer and you should be fine. http://stackoverflow.com/a/2097341/2622467 – kloetpatra May 15 '14 at 09:24
  • @kloetpatra I do not want to change `ToolStrip` rendering. I want to change the rendering/coloring of the custom control – horgh May 15 '14 at 23:53

0 Answers0