PDA

View Full Version : Add a class to a tree node



alexwells
13 Jun 2012, 7:27 AM
I would like to highlight some of the nodes in an Ext.tree.Panel.

In Ext3 I accomplished this by adding a class to the tree node ui object:

// add a class with to highlight the node
myTreeNode.getUI().addClass('highlightclass');

// remove the class to remove the highlighting
myTreeNode.getUI().removeClass('highlightclass');

What is the equivalent in Ext4?
I have been able to change the icon by setting the iconCls field of my node model, but I would really like to be able to set a class that allows me to highlight the whole node.