1 Reply Latest reply on Sep 2, 2008 3:33 PM by invokeMe

    Tree items too tall


      I have created a custom TreeItemRenderer that is based on a chunk of XML. My problem is the tree renders each node based on the height of the XML snippet and not the label height. I am not explicitly setting the height of the node anywhere but it all seems to work when I use a custom labelFunction. I would prefer not to use a custom labelFunction and would like to set the proper height in my custom TreeItemRenderer. Does anyone know why it is using the height of the data attribute instead of the label?
        • 1. Tree items too tall
          invokeMe Level 1
          I think I figured it out.

          During the creation of the Tree the node label is created from either the labelField or labelFunction. If neither of those exist then the data object is stringified which in my case resulted in an XML string. The height of the label is then used as the height of each node. My XML string happened to be tall so my nodes were too.

          The solution was to just use a labelFunction to pull the correct label out of each XML node.