Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 126,008 times

Contents

Downloads

Related Categories

TreeView Control - TreeView Styles

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.

James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.

Comments

  • treeview

    Posted by jmhshep on 03 Mar 2005

    I tried your treeview example and when I try to add and image it is telling me that I need to initilaize the image first. Can you tell me what that means and how to fix it

  • treeview

    Posted by directorz on 28 May 2004

    I tried this and recieved the following: Compile error: variable not defined..."TreeView" is highlited...anyone have any ideas?

  • Good & Thanks

    Posted by gabar on 14 May 2004

    Very Good, You have helped me.

    gabriel medina
    gxsoft@hotmail.com

  • Good

    Posted by behmagvb on 11 Aug 2003

    Good Example isn't it?
    http://www.pldental.com

  • ??? Got Problems with that

    Posted by LittleMik on 24 Jun 2003

    Hi,

    Found this very good tutorial because its nearly exact the problem i have with my TreeView,...
    ...but unfortunatly, i can't get it to work...

    Set the same settings like in the tutorial, but...