Skip to main content
Version: 8.1

Vision - Tree View

Component Palette Icon:


The Tree View component can display any tree hierarchy. It is configured by filling in a dataset. Each column title in the dataset is a property of the Tree View Customizer.

Each row in the dataset will become a node in the tree. Each node has a path that determines its location in the tree, for example, "West Area/Process/Valve1". The Separation Character property dictates how the paths are broken up. Any missing folder nodes needed by a leaf node are created implicitly. The other columns in the dataset besides "Path" are used to configure the look for the node, both when it is selected and when it is not. All column properties in the dataset are described in the Tree View Customizer.


PropertyDescriptionProperty TypeScriptingCategory
Auto ExpandIf true, the tree will automatically expand the tree structure up to the level specified by Auto Expansion Level.boolean.autoExpandBehavior
Auto Expansion LevelIf Auto Expand is true, this is the depth level that will be expanded. Zero means
Auto SortWhether or not to automatically sort the tree.boolean.autoSortBehavior
Background ColorThe background color of the component. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.Color.backgroundAppearance
BorderThe border surrounding this component. Options are No border, Etched (Lowered), Etched (Raised), Bevel (Lowered), Bevel (Raised), Bevel (Double), and Field Border.
Note: The border is unaffected by rotation.

Changed in 8.1.21
As of 8.1.21, the "Button Border" and "Other Border" options are removed.
Default Closed IconThe default closed icon if no icon is set.String.defaultClosedIconPathAppearance
Default Leaf IconThe default leaf icon if no icon is set.String.defaultLeafIconPathAppearance
Default Node BackgroundThe default background of a node if no background is set. See Color Selector.Color.defaultBackgroundAppearance
Default Node BorderThe default border of a node if no border is set.Border.defaultBorderAppearance
Default Node ForegroundThe default foreground of a node if no foreground is set. See Color Selector.Color.defaultForegroundAppearance
Default Node Selected BackgroundThe default selected background of a node if no background is set. See Color Selector.Color.defaultSelectedBackgroundAppearance
Default Node Selected BorderThe default selected border of a node if no border is set.Border.defaultSelectedBorderAppearance
Default Node Selected ForegroundThe default selected foreground of a node if no foreground is set. See Color Selector.Color.defaultSelectedForegroundAppearance
Default Open IconThe default open icon if no icon is set.String.defaultOpenIconPathAppearance
EnabledIf disabled, a component cannot be used.boolean.componentEnabledCommon
FontFont of text on this component.Font.fontAppearance
Full Width Selection
New in 8.1.19
Whether to paint the selection across the width of the tree. Default is true.
ItemsContains the items of the tree view.Dataset.dataData
Line StyleThe tree's line
Mouseover TextThe text that is displayed in the tooltip which pops up on mouseover of this component.String.toolTipTextCommon
NameThe name of this component.String.nameCommon
QualityThe data quality code for any Tag bindings on this component.QualityCode.qualityData
Row HeightThe height of each row in the
Selected ItemThe index of the currently selected item, or -1 if no
Selected PathThe path of the currently selected item, or "" if no selection.String.selectedPathData
Selection Fill Color
New in 8.1.19
The background color to fill the selection width with. See Color Selector.
Selection ModeWhat kind of selection regions does the tree allow. Options are Single, Multiple - Contiguous, and Multiple -
Separation CharacterThe separation character for the path.String.separationCharacterBehavior
Show Root HandlesWhether or not to show handles next to parent nodes.boolean.showRootHandlesAppearance
VisibleIf disabled, the component will be hidden.boolean.visibleCommon

Deprecated Properties

PropertyDescriptionProperty TypeScriptingCategory
Data QualityThe data quality code for any Tag bindings on this


See the Vision - Tree View Scripting Functions page for the full list of scripting functions available for this component.

Event Handlers

Event handlers allow you to run a script based off specific triggers. See the full list of available event handlers on the Component Events page.



Expression Snippet
//The Selected Item property will be updated as the user selects different nodes in the tree. 
//It represents the index in the Items dataset at which the node is defined. If the selected
//node was implicitly created, the Selected Item will be -1.
//You can use this index to get the path and name of the selected node with an expression binding like this:
if ({Root Container.Tree View.selectedItem}<0,"n/a",{Root Container.Tree}[{Root Container.Tree View.selectedItem},"text"])
Script Snippet
#This script will swap to the script that was double clicked on, if this code is placed in the mouseClicked event handler for the treeview
#This script utilizes an extra column called windowPath that contains the full path to the window. You can add an extra column to the Items dataset property
#as long as the column name doesn't match one of the reserved column titles listed above.
if event.clickCount == 2:
row = event.source.selectedItem
data =
if row != -1:
# Grab the window path value out of the tree view's items dataset
windowPath = data.getValueAt(row, "windowPath")