menu strip.......
-
hi, In my windows application i added a menu strip item. The default color of the menu strip is the colors of the windows xp (blue and white). When i change the backgroung color property to the color i want it is changed. but when i click on an item for example File the menu that pops down under it has the color of the original menu strip (blue and white). I need it to be as the color i set. I couldn't find any property for that. Is there a way to do it?
-
hi, In my windows application i added a menu strip item. The default color of the menu strip is the colors of the windows xp (blue and white). When i change the backgroung color property to the color i want it is changed. but when i click on an item for example File the menu that pops down under it has the color of the original menu strip (blue and white). I need it to be as the color i set. I couldn't find any property for that. Is there a way to do it?
This code works for me. MenuStrip mainmenu; ToolStripMenuItem File; ToolStripMenuItem News; ToolStripMenuItem Exit; mainmenu = new MenuStrip(); File = new ToolStripMenuItem(); News = new ToolStripMenuItem(); Exit = new ToolStripMenuItem(); mainmenu.BackColor = Color.Red; mainmenu.ForeColor = Color.Yellow; File.BackColor = Color.Violet; File.ForeColor = Color.Cyan; News.BackColor = Color.DarkBlue; News.ForeColor = Color.DarkGreen; Exit.BackColor = Color.DarkViolet; Exit.ForeColor = Color.DeepPink; File.Text = "File"; News.Text = "News"; Exit.Text = "Exit"; File.DropDownItems.Add(News); File.DropDownItems.Add(Exit); mainmenu.Items.Add(File); this.Controls.Add(mainmenu);
-
This code works for me. MenuStrip mainmenu; ToolStripMenuItem File; ToolStripMenuItem News; ToolStripMenuItem Exit; mainmenu = new MenuStrip(); File = new ToolStripMenuItem(); News = new ToolStripMenuItem(); Exit = new ToolStripMenuItem(); mainmenu.BackColor = Color.Red; mainmenu.ForeColor = Color.Yellow; File.BackColor = Color.Violet; File.ForeColor = Color.Cyan; News.BackColor = Color.DarkBlue; News.ForeColor = Color.DarkGreen; Exit.BackColor = Color.DarkViolet; Exit.ForeColor = Color.DeepPink; File.Text = "File"; News.Text = "News"; Exit.Text = "Exit"; File.DropDownItems.Add(News); File.DropDownItems.Add(Exit); mainmenu.Items.Add(File); this.Controls.Add(mainmenu);
i will try that, thanks
-
hi, In my windows application i added a menu strip item. The default color of the menu strip is the colors of the windows xp (blue and white). When i change the backgroung color property to the color i want it is changed. but when i click on an item for example File the menu that pops down under it has the color of the original menu strip (blue and white). I need it to be as the color i set. I couldn't find any property for that. Is there a way to do it?
I myself was having same problem while selecting a treenode. that if i set its backgrout color or foreground color then its fine and it works but i want that when ever i select the node then the default windows color apear(blue,olive or grey) and i want a different color to apear so how to do so?? its same problem i guess only control is different:) i will try sugestion of menu strip as well! thax in advance! sam tam
-
This code works for me. MenuStrip mainmenu; ToolStripMenuItem File; ToolStripMenuItem News; ToolStripMenuItem Exit; mainmenu = new MenuStrip(); File = new ToolStripMenuItem(); News = new ToolStripMenuItem(); Exit = new ToolStripMenuItem(); mainmenu.BackColor = Color.Red; mainmenu.ForeColor = Color.Yellow; File.BackColor = Color.Violet; File.ForeColor = Color.Cyan; News.BackColor = Color.DarkBlue; News.ForeColor = Color.DarkGreen; Exit.BackColor = Color.DarkViolet; Exit.ForeColor = Color.DeepPink; File.Text = "File"; News.Text = "News"; Exit.Text = "Exit"; File.DropDownItems.Add(News); File.DropDownItems.Add(Exit); mainmenu.Items.Add(File); this.Controls.Add(mainmenu);
hi, it is not working completly it works fine until i click of one of the main items (File menu item). then this item changes back to the original colors, but the items under it doesn't change, They keep the color i gave to them. do you know how to solve this
-
I myself was having same problem while selecting a treenode. that if i set its backgrout color or foreground color then its fine and it works but i want that when ever i select the node then the default windows color apear(blue,olive or grey) and i want a different color to apear so how to do so?? its same problem i guess only control is different:) i will try sugestion of menu strip as well! thax in advance! sam tam
Yea this is happening with me too. if you find any solution for it, please give me a note. Good luck