Notifications
Clear all
[Closed] ContextMenuStrip back color
May 19, 2020 3:01 pm
I’m using ContextMenuStrip.
I have a nested menu.
ContextMenu backColor only change back color of the top menus.
I found Denis’s paint trick.
I could change color of nested menu back color.
BUT, I can not change the border(?) around menu.
Any ideas?
4 Replies
May 19, 2020 3:01 pm
So… I guess I need to override color table of renderer.
I have no idea how I would do in mxs…
May 19, 2020 3:01 pm
// This class defines the gradient colors for
// the MenuStrip and the ToolStrip.
class CustomProfessionalColors : ProfessionalColorTable
{
public override Color ToolStripGradientBegin
{ get { return Color.BlueViolet; } }
public override Color ToolStripGradientMiddle
{ get { return Color.CadetBlue; } }
public override Color ToolStripGradientEnd
{ get { return Color.CornflowerBlue; } }
public override Color MenuStripGradientBegin
{ get { return Color.Salmon; } }
public override Color MenuStripGradientEnd
{ get { return Color.OrangeRed; } }
}
May 19, 2020 3:01 pm
This does not seem to be what you need. Can you show an image of what you want to draw on your own and how it should look like?