2 Replies Latest reply on Oct 11, 2011 7:59 PM by archemedia

    Tree label

    archemedia Level 4

      Hi,

       

      I'm struggling with a tree problem.

      Normal labels show up like this:

      Schermafbeelding 2011-10-11 om 12.16.19.png

      Very long labels however show up like this:

      Schermafbeelding 2011-10-11 om 12.17.55.png

      Problems:

      1. Indent of the first line

      2. following lines are too close to the icon

      3. icon should be placed at the top

       

      This is how I want the label to be presented:

      Schermafbeelding 2011-10-11-2.jpg

       

      Any help is welcome,

      Thx,

       

      Dany

        • 1. Re: Tree label
          UbuntuPenguin Level 4

          You may have to make a custom TreeItemRenderer that extends the TreeItemRenderer class and do your stuff there.  I looked at the updateDisplayList method of TreeItemRenderer.as and that seems to be the part of interest to you which is where the set the y variable for the icon and disclosureIcon.  There is a style parameter in that method too that is used  alight the label also.

          1 person found this helpful
          • 2. Re: Tree label
            archemedia Level 4

            I know that I should extend the TreeItemRenderer class but I haven't been able to find the right properties and styles so far. I will look into it further. thx