TreeList.ActiveColor

Syntax

ActiveColor: PP.Color | RGB |String

Description

The ActiveColor property determines color of active tree node.

Comments

Use JSON or the setActiveColor method to set the property value and the getActiveColor method to get the property value.

By default, the property value is set to #E4E4E4 (bright grey color).

Example

To execute the example, the page must contain the TreeList component named treeListSett (seebsp; Example of Creating the TreeList Component). Change the color, font parameters and the color of all parent nodes of enabled node:

// Change the color of active node for purple
treeListSett.setActiveColor("#A020F0");
// Change the text size of active node for 20
treeListSett.setActiveFont(new PP.Font({ Size: 20 }));
// Change the color of active node parent elements for green
treeListSett.setActiveParentColor("#A9D8B5");

Click the tree node with the text "South Africa". As a result, selected node will be in purple, 20 text size and all parent nodes will be in green:

Deselect all selected nodes:

//Deselect all selected nodes
treeList.clearSelection();

As a result, there will be no selected nodes in hierarchical tree:

See also:

TreeList