Darren, If your XML nodes have attributes (ie.
<node label=”foo”></node>) – you can use the
‘labelField’ attribute to control the labels.
<mx:Tree id="myTree" labelField="@label"/> If they don’t (ie.
<foo>bar</foo>) – or if you want to do any sort of custom
label logic, you need to use the ‘labelFunction’ attribute to set
the values appropriately. <mx:Tree
id="myTree2 labelFunction="myLabelFunc"/>
public function myLabelFunc (item:XML):String{
//if node has children
if(item.children().toString() != ''){
return item.name();
}
//no children, it’s a leaf so get the value
else{
return item.toXMLString();
}
} regards, peter From: Bump?? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
__,_._,___ |
- RE: [flexcoders] How to cast a WebService lastResult when ... Peter Watson
- RE: [flexcoders] How to cast a WebService lastResult ... Peter Watson
- RE: [flexcoders] How to cast a WebService lastRes... Darren Houle
- RE: [flexcoders] How to cast a WebService lastResult ... Tracy Spratt
- RE: [flexcoders] How to cast a WebService lastRes... Darren Houle
- Re: [flexcoders] How to cast a WebService lastResult ... Douglas Knudsen
- [flexcoders] Re: How to cast a WebService lastRes... Mike Collins
- RE: [flexcoders] Re: How to cast a WebService... Darren Houle