Freetutes.com

VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering


You are here: Visual Basic > Advanced VB6 tutorial > Chapter 4

EnsureVisible and GetVisibleCount Methods of TreeView Control in Visual Basic 6

If at some point during the execution of your program, you need to make sure that a node in the TreeView is visible, you can use the EnsureVisible method of a specific node:

TreeView1.Nodes(23).EnsureVisible

This makes the node with an index of 23 visible to the user even if the node is several levels deep in a tree that is completely collapsed. The EnsureVisible property expands the tree to make the node visible.

To get the number of nodes visible at any one time, you can use the GetVisibleCount method of the TreeView control. By using

TreeView1.GetVisibleCount

you will get a count of nodes visible within the TreeView. The count will only include those nodes that are visible, including any nodes partially visible at the bottom of the control. The count does not include any nodes expanded below the bottom edge of the TreeView control.

Treeview Control topics

See Also


  

.<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © Freetutes.com | All Rights Reserved