views:

27

answers:

2

Does anyone know of a way to specify different vertical gaps between siblings in a Tree? I want to child nodes spaced tighter together (maybe 10px) while the top level parents remain spaced further apart (20px). Essentially, I need to change the gap dynamically based upon the depth of the node, but I'm not sure if the Tree class (or the List class, which Tree extends) offers this type of functionality. Any ideas? Thanks in advance.

A: 

Can you use an itemRenderer and add spacing to the itemRenderer based on the data sent in?

www.Flextras.com
I am currently using a custom itemRenderer, so changing the height or padding of it based on the data won't be difficult... I'll give it a try and report back.
Doug
Regardless of any changes to the height or padding of the itemRenderer it appears as though the tree still spaces each node according to its own paddingTop and paddingBottom properties.
Doug
A: 

I would try setting the padding to the minimum you want, then add <mx:Spacer ... /> with whatever additional height/ width you want to add between the children where desired.

Wade