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. Visual Basic
  4. How to Select Root in TreeView?

How to Select Root in TreeView?

Scheduled Pinned Locked Moved Visual Basic
tutorialquestion
5 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.
  • V Offline
    V Offline
    vancouver777
    wrote on last edited by
    #1

    Is there any way to select Root element? VB6

    D R 2 Replies Last reply
    0
    • V vancouver777

      Is there any way to select Root element? VB6

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Define "Root element". You can have multiple root TreeNodes in the Nodes collection, any of which are selectable. Can you be a bit more specific about what your trying to accomplish? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      V 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Define "Root element". You can have multiple root TreeNodes in the Nodes collection, any of which are selectable. Can you be a bit more specific about what your trying to accomplish? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        V Offline
        V Offline
        vancouver777
        wrote on last edited by
        #3

        just like "root element" in xml

        D 1 Reply Last reply
        0
        • V vancouver777

          just like "root element" in xml

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          I know it's just like the root element in XML, but the TreeView has no equivelent. That's why I asked you to be more specific about what your trying to accomplish. All the nodes in the TreeView control are contained in the Nodes property of the TreeView. Each Node has a property which determines wheather or not that node is a child and what its parent node is. If Parent returns Nothing, this node is a root node. So, I'll ask this again. What are you trying to accomplish by selecting the root node(s) of a TreeView control? How do you want to select this node? By clicking on it or by doing what to it in code? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          1 Reply Last reply
          0
          • V vancouver777

            Is there any way to select Root element? VB6

            R Offline
            R Offline
            Ravi S V
            wrote on last edited by
            #5

            to select the root node in the TreeView control Dim rnode As Node Set rnode = TreeView1.Nodes(0).Root now the rnode is set with the root node of your treeview control. thanx, ravi

            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