Click here to Skip to main content
15,891,993 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my problem is : i made a menu like (File) and come from it many items like (New-Edit-,,,) when i change the color the background color to be by example Red the items won't change the color so i change the back color of every item but it have a white border also and this is my code

C#
public partial class Start_Page : Form
    {
        public Start_Page()
        {
            InitializeComponent();
            menuStrip1.Renderer = new MyRenderer();



        }

        private class MyRenderer : ToolStripProfessionalRenderer
        {
            public MyRenderer() : base(new MyColors()) { }
        }

        private class MyColors : ProfessionalColorTable
        {
            public override Color MenuItemSelected
            {
                get { return Color.FromArgb(11, 126, 222); }
            }
            public override Color MenuItemSelectedGradientBegin
            {
                get { return Color.FromArgb(11, 126, 222); }
            }
            public override Color MenuItemSelectedGradientEnd
            {
                get { return Color.FromArgb(11, 126, 222); }
            }
            public override Color MenuItemPressedGradientBegin
            {
                get{ return Color.FromArgb(8, 64, 101); }
            }
            public override Color MenuItemPressedGradientEnd
            {
                get { return Color.FromArgb(8, 64, 101); }
            }
            public override Color MenuBorder
            {
                get
                {
                    return Color.Blue;
                }
            }
            public override Color MenuItemBorder
            {
                get
                {
                    return Color.Blue;
                }
            }


the border have the blue color but the white color still there how i clear it ??
Posted
Comments
Sergey Alexandrovich Kryukov 10-May-13 16:22pm    
Is it System.Windows.Forms? Tag it.
—SA

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900