1 Reply Latest reply on May 23, 2007 6:33 AM by foxglove1028

    Tree Label - verticalAlign??

    foxglove1028
      I've gone round and round with this tree component trying to get the labelField to verticalAlign to the middle and still I can't get it to stop aligning to the top.

      I would like help in figuring this out so that I may use bigger icons with my Tree component.

      If someone would be so kind to share the css code or the direct style declaration for the tree label it would be greatly appreciated.

      Thank you in advance to the kind soul who chooses to help out
        • 1. Re: Tree Label - verticalAlign??
          foxglove1028 Level 1
          Found the solution...

          Of course an item renderer has be incorporated into the solution.

          You make a class that extends the TreeItemRenderer and then override
          the protected function createChildren()
          then you put in that function the following:

          super.createChildren();
          super.label.multiline = true;
          super.label.autoSize = TextFieldAutoSize.LEFT;

          and that's all you need to get the label to render correctly with the vertical align property on the tree component. Don't forget to set your new component class as the tree's itemRenderer.