Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


GLOSSARY


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL MANUAL VERSIONS

Ignition 8
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata


General

Component Palette Icon:


 


IULocgo


Tree View

Description

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 (by default is a forward-slash), 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.

Tree View Component Properties
NameDescriptionProperty 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 expand-all.int.autoExpansionLevelBehavior
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
Border

The border surrounding this component. Options are: No border, Etched (Lowered), Etched (Raised), Bevel (Lowered), Bevel (Raised), Bevel (Double), Button Border, Field Border, Line Border, and Other Border.

The border is unaffected by rotation.

Border.borderCommon
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
ItemsContains the items of the tree view.Dataset.dataData
Line StyleThe tree's line style.int.lineStyleAppearance
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 tree.int.rowHeightAppearance
Selected ItemThe index of the currently selected item, or -1 if no selection.int.selectedItemData
Selected PathThe path of the currently selected item, or "" if no selection.String.selectedPathData
Selection ModeWhat kind of selection regions does the tree allow.int.selectionModeBehavior
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
Data QualityThe data quality code for any Tag bindings on this component.int.dataQualityDeprecated
Scripting
Scripting Functions
 .clearSelection()
  • Description

Clears the current selection.

  • Parameters

Nothing

  • Return

Nothing

  • Scope

Client

 .collapseAll()
  • Description

Collapses all nodes in the tree.

  • Parameters

Nothing

  • Return

Nothing

  • Scope

Client

 .expandAll()
  • Description

Expands all nodes in the tree.

  • Parameters

Nothing

  • Return

Nothing

  • Scope

Client

 .getSelectedItems()
  • Description

Returns a list of the selected item's indexes. These are the row indexes that the selected tree nodes were found in the underlying dataset. Implicitly created folder nodes that have no index will not be included.

  • Parameters

Nothing

  • Return

List of Integers

  • Scope

Client

 .getSelectedPaths()
  • Description

Returns a list of the selected item's paths. A path to an item is the path to its parent plus its normal (non-selected) text.

  • Parameters

Nothing

  • Return

List of Strings

  • Scope

Client

Extension Functions

This component does not have extension functions associated with it.

Event Handlers
 mouse
 mouseClicked

This event signifies a mouse click on the source component. A mouse click the combination of a mouse press and a mouse release, both of which must have occurred over the source component. Note that this event fires after the pressed and released events have fired.

.sourceThe component that fired this event
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseEntered

This event fires when the mouse enters the space over the source component.

.sourceThe component that fired this event
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseExited

This event fires when the mouse leaves the space over the source component.

.sourceThe component that fired this event
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mousePressed

This event fires when a mouse button is pressed down on the source component.

.sourceThe component that fired this event
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseReleased

This event fires when a mouse button is released, if that mouse button's press happened over this component.

.sourceThe component that fired this event
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseMotion
 mouseDragged

Fires when the mouse moves over a component after a button has been pushed.

.sourceThe component that fired this event
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseMoved

Fires when the mouse moves over a component, but no buttons are pushed.

.sourceThe component that fired this event
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 propertyChange
 propertyChange

Fires whenever a bindable property of the source component changes. This works for standard and custom (dynamic) properties.

.sourceThe component that fired this event
.newValueThe new value that this property changed to.
.oldValueThe value that this property was before it changed. Note that not all components include an accurate oldValue in their events.
.propertyName

The name of the property that changed.

Remember to always filter out these events for the property that you are looking for! Components often have many properties that change.

Customizers

The Tree View customizer allows for easy custom manipulation of the tree view components underlying formatting.

Examples

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 View.data}[{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 = event.source.data
	if row != -1:
		# Grab the window path value out of the tree view's items dataset
		windowPath = data.getValueAt(row, "windowPath")
		system.nav.swapTo(windowPath)
  • No labels