Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. menu strip.......

menu strip.......

Scheduled Pinned Locked Moved C#
tutorialquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    quiteSmart
    wrote on last edited by
    #1

    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?

    G S 2 Replies Last reply
    0
    • Q quiteSmart

      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?

      G Offline
      G Offline
      GunaChinna
      wrote on last edited by
      #2

      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);

      Q 2 Replies Last reply
      0
      • G GunaChinna

        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);

        Q Offline
        Q Offline
        quiteSmart
        wrote on last edited by
        #3

        i will try that, thanks

        1 Reply Last reply
        0
        • Q quiteSmart

          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?

          S Offline
          S Offline
          samtam
          wrote on last edited by
          #4

          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

          Q 1 Reply Last reply
          0
          • G GunaChinna

            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);

            Q Offline
            Q Offline
            quiteSmart
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            • S samtam

              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

              Q Offline
              Q Offline
              quiteSmart
              wrote on last edited by
              #6

              Yea this is happening with me too. if you find any solution for it, please give me a note. Good luck

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups