Skip to content

[Back to Parameters]

Tree

A widget that allows a user to select items from a tree containing the parameter choices.

ℹ The choiceSettings object described in the Parameters page is required for defining an instance of this parameter.

ℹ If a display value is associated with more than one choice, then all the associated choices will be selected when that display value is selected.

Key Type Required Default Description UPM/TD
singleSelection bool ❌ false If true, the user is only allowed to select a single item. ✔
nodeDelimiter str ❌ . The delimiter separating tree nodes within each choice option.1 ✔
nodesToExpand arr(str)/parameter ❌ ➖ A list of node names to expand by default.2 ✔
scrollTo enum: noScroll, firstExpanded,
lastExpanded
❌ lastExpanded Specifies the default scroll position of the tree dialog when opened. noScroll will open scrolled to the top. ✔
defaultFilter str/parameter ❌ "" The default value for the filter field within the selection dialog, which will hide non-matching items from the tree view. ❌
showParentsAsLeaves bool ❌ false Allows selecting parent nodes as values, independent from the selected state of their children. ❌
inline bool ❌ false If true, the selection UI will be displayed directly in the parameter dialog. ✔
showSelectedItemGroup bool ❌ true If true, currently selected item(s) are displayed below the tree. ✔
textElideMode enum: elideText,showHorizontalScrollBar ❌ elideText Specifies how to display items that don't fit within the editor's width.
If elideText, the item is truncated and suffixed with ....
If showHorizontalScrollBar, a horizontal scrollbar is added to the tree view.
✔

Deprecated

Key Type Required Default Description UPM/TD
delimiter str ❌ <space> The delimiter to use between items when in multiple selection mode. ✔
maxDepth int/parameter ❌ 0 An integer indicating how deep to allow selections. 0 allows unlimited depth. ❌

Example

{
  "name": "sometree",
  "type": "tree",
  "valueType": "list",
  "description": "Supported Geometries",
  "choiceSettings": {
    "choiceSet": "attributeNames"
  }
}

Parameter References

When a property supports parameter references, its value can be either a constant value, or a reference to another parameter in the form of an object containing the key "parameter" with the value being the name of the referenced parameter.

Example

Constant Value:

{
  "exampleOption": "stringValue"
}

Parameter Reference:

{
  "exampleOption": { "parameter" : "MY_PARAM" }
}

  1. Example: if delimiter is ., then a choice value of a.b will produce a tree where a is a root node and b is a child of a

  2. Child nodes are referenced by adding the parent name and nodeDelimiter before the node name.