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