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. how to create sub menu item by coding

how to create sub menu item by coding

Scheduled Pinned Locked Moved C#
tutorial
5 Posts 4 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.
  • X Offline
    X Offline
    xingselex
    wrote on last edited by
    #1

    i have a Menu bar . and i want to create sub item and add it into Menu ... please give me some guide line..

    0 P 2 Replies Last reply
    0
    • X xingselex

      i have a Menu bar . and i want to create sub item and add it into Menu ... please give me some guide line..

      0 Offline
      0 Offline
      0x3c0
      wrote on last edited by
      #2

      Assuming the name of your menu is MenuStrip1, then create a new ToolStripMenuItem and add it to the DropDownItems collection of MenuStrip1

      X 1 Reply Last reply
      0
      • 0 0x3c0

        Assuming the name of your menu is MenuStrip1, then create a new ToolStripMenuItem and add it to the DropDownItems collection of MenuStrip1

        X Offline
        X Offline
        xingselex
        wrote on last edited by
        #3

        may u give me as code?

        M 1 Reply Last reply
        0
        • X xingselex

          may u give me as code?

          M Offline
          M Offline
          musefan
          wrote on last edited by
          #4

          xingselex wrote:

          may u give me as code?

          He practically did just give you it as code. If you cant work out the code from what he said then you are way out of your league with what you are trying to do. You need to get a book on the basics of .Net, possible even programming in general if all you do is copy and paste code.

          Life goes very fast. Tomorrow, today is already yesterday.

          1 Reply Last reply
          0
          • X xingselex

            i have a Menu bar . and i want to create sub item and add it into Menu ... please give me some guide line..

            P Offline
            P Offline
            padmanabhan N
            wrote on last edited by
            #5

            MenuItem m = new MenuItem("aaa", "1"); Menu1.Items.Add(m); m.ChildItems.Add(new MenuItem("bbb", "2")); m.ChildItems.Add(new MenuItem("ccc", "3"));

            Padmanabhan

            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