CellTree styling on Closed Node vs. Leaf Node

43 views
Skip to first unread message

Eric Andresen

unread,
May 31, 2012, 6:08:49 PM5/31/12
to google-we...@googlegroups.com
Is there any way in a CellTree to apply different styles to a Leaf node vs. a Closed non-leaf node?  I see separate styles for open nodes, but no way to tell between the other two.

So far the best I've come up with are:

 *  Use a CSS sibling selector such as:
      .cellTreeItemImage + .cellTreeItemValue { ... }

  * Add styling inside my AbstractCell.render() method based on the isLeaf() method.

However, both of these come with the limitation that I can only style my .cellTreeItemValue and .cellTreeItemImage nodes, not the parent .cellTreeItem or .cellTreeItemImageValue nodes.  

Does anyone else know of a better way to do this?  Is it possible to extend the CellTree renderer to apply a specific style to leaf nodes?

Thanks,
Eric

Reply all
Reply to author
Forward
0 new messages