GetVisibleCount

Returns the number of Node objects that fit in the internal area of a TreeView control.

Syntax

object.GetVisibleCount

The object placeholder represents an object expression that evaluates to an object.

Remarks

The number of Node objects is determined by how many lines can fit in a window. The total number of lines possible is determined by the height of the control and the Size property of the Font object. The count includes the partially visible item at the bottom of the list.

You can use the GetVisibleCount property to make sure that a minimum number of lines are visible so the user can accurately assess a hierarchy. If the minimum number of lines is not visible, you can reset the size of the TreeView using the Height property.

If a particular Node object must be visible, use the EnsureVisible method to scroll and expand the TreeView control.