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. Treeview Topnode problem

Treeview Topnode problem

Scheduled Pinned Locked Moved Visual Basic
helpquestion
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.
  • D Offline
    D Offline
    dBrong
    wrote on last edited by
    #1

    I build a treeview from data sorted alpha. Everything works fine, looks fine. However treeview.topnode.ensurevisible() is at about the 4 th node. Treeview.Nodes(0).Ensurevisible() works! Does anyone know what property VB uses to determine the top node?

    D 1 Reply Last reply
    0
    • D dBrong

      I build a treeview from data sorted alpha. Everything works fine, looks fine. However treeview.topnode.ensurevisible() is at about the 4 th node. Treeview.Nodes(0).Ensurevisible() works! Does anyone know what property VB uses to determine the top node?

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

      It sounds like you've assumed that TopNode returns the root node of the Tree. Reading the documentation tells you what is really means. TopNode returns the first fully-visible node displayed in the TreeView. And it's not VB that makes this determination, it's the code in the TreeView code in the .NET Framework.

      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      D 1 Reply Last reply
      0
      • D Dave Kreskowiak

        It sounds like you've assumed that TopNode returns the root node of the Tree. Reading the documentation tells you what is really means. TopNode returns the first fully-visible node displayed in the TreeView. And it's not VB that makes this determination, it's the code in the TreeView code in the .NET Framework.

        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        D Offline
        D Offline
        dBrong
        wrote on last edited by
        #3

        Silly me, I assumed the top node was the Top Node! Thanks for the clarification.

        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