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. Looping through objects and their subobjects and their subobjects etc

Looping through objects and their subobjects and their subobjects etc

Scheduled Pinned Locked Moved C#
question
3 Posts 2 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.
  • O Offline
    O Offline
    o m n i
    wrote on last edited by
    #1

    How can I loop through every single toolstripmenuitem in a toolstrip, including the subitems of each item, and each of the subitems of that item, and each of the subitems of that item (with no set limit to how deep it can go)?

    S 1 Reply Last reply
    0
    • O o m n i

      How can I loop through every single toolstripmenuitem in a toolstrip, including the subitems of each item, and each of the subitems of that item, and each of the subitems of that item (with no set limit to how deep it can go)?

      S Offline
      S Offline
      Saksida Bojan
      wrote on last edited by
      #2

      Make a function to call itself, but beware you can easly get infinitive loop if you are not careful. Recursion made simple[^]

      O 1 Reply Last reply
      0
      • S Saksida Bojan

        Make a function to call itself, but beware you can easly get infinitive loop if you are not careful. Recursion made simple[^]

        O Offline
        O Offline
        o m n i
        wrote on last edited by
        #3

        Thanks, wasn't think of it that way.

        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