TreeView Control

TreeView Styles

The TreeView control has a number of properties that changes the way it looks. A few are discussed below.

Indentation - Sets the amount distance between a node and its children.

BorderStyle - Sets the style of the border. Either ccNone (no border) or ccFixedSingle (single border)

Appearance - Sets the appearance of the TreeView control. Either cc3D (3D style appearance) or ccFlat (flat appearance)

LineStyle - Sets the line style. Either tvwRootLines (lines come from the very top) or tvwTreeLines (lines come from each item at the top level). The best way to see this is to try it at home!

Style - Sets the treeview style. Can be set to one of the following:

tvwTextOnly - Only text is displayed. No treelines, images or plus/minus's (expand/shrink) are displayed
tvwPictureText - Text and pictures are displayed. No treelines or plus/minus's.
tvwPlusMinusText - Text and plus/minus's are displayed. No treelines or images.
tvwPlusPictureText - Text, plus/minus's and images are displayed. No treelines.
tvwTreelinesText - Text and treelines are displayed. No images or plus/minus's.
tvwTreelinesPictureText - Text, images and treelines are displayed. No plus/minus's
tvwTreelinesPlusMinusText - Text, treelines and plus/minus's are displayed. No images
tvwTreelinesPlusMinusPictureText - Text, treelines, plus/minus's and images are all displayed.

Please note that you need to assign an image to each item for an image to be displayed.

You might also like...

Comments

About the author

James Crowley

James Crowley United Kingdom

James first started this website when learning Visual Basic back in 1999 whilst studying his GCSEs. The site grew steadily over the years while being run as a hobby - to a regular monthly audien...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Programs must be written for people to read, and only incidentally for machines to execute.”