Hi.
How can i apply different itemRenderes for both branchs and leafs in a
mx:Tree? I applied an itemRenderer but it replaces all items (see code
example below).
I'd like to have a custom renderer for folders (branches) and a custom only
for files (leafs);
## Code:
<fx:Declarations>
<mx:XMLListCollection id="arr">
<fx:XMLList>
<folder label="MAIL">
<file label="INBOX"/>
<folder label="Personal Folder">
<file label="Business" />
</folder>
<file label="Sent" />
<file label="Trash" />
</folder>
</fx:XMLList>
</mx:XMLListCollection>
</fx:Declarations>
<mx:Tree dataProvider="{arr}" dragEnabled="true" dropEnabled="true"
contentBackgroundAlpha="0"
width="100%" height="100%" borderVisible="false" labelField="@label"
showRoot="false" allowMultipleSelection="true">
<mx:itemRenderer>
<fx:Component>
<mx:HBox width="100%" height="36">
<mx:Button enabled="false" width="24" height="24"/>
<mx:VBox verticalGap="-7" top="0">
<mx:Label width="100%" text="{data.@label}"/>
<mx:CheckBox />
</mx:VBox>
</mx:HBox>
</fx:Component>
</mx:itemRenderer>
</mx:Tree>
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.