Visual Basic: Windows Controls

Visual Studio 6.0

Style Property (TreeView Control)

See Also    Example    Applies To

Returns or sets the type of graphics (images, text, plus/minus, and lines) and text that appear for each Node object in a TreeView control.


object.Style [ = number]

The Style property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
number An integer specifying the style of the graphics, as described in Settings.


The settings for number are:

Setting Description
0 Text only.
1 Image and text.
2 Plus/minus and text.
3 Plus/minus, image, and text.
4 Lines and text.
5 Lines, image, and text.
6 Lines, plus/minus, and text.
7 (Default) Lines, plus/minus, image, and text.


If the Style property is set to a value that includes lines, the LineStyle property determines the appearance of the lines. If the Style property is set to a value that does not include lines, the LineStyle property will be ignored.