I would modify or subclass TreeItemRenderer, mimic the code for mouseDown handling on disclosureIcon and apply it to the icon as well.
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of mubasherhaneef Sent: Friday, September 07, 2007 1:52 PM To: [email protected] Subject: [flexcoders] How to expand TREE Node children by clicking folder icon instead of triangle I have a question regarding opening of tree branch node; In a tree, a branch node can contain multiple child nodes, and, by default, appears as a folder icon with a disclosure triangle that lets users open and close the folder but I was trying to open child node/folder, when user will click either on triangle or on folder icon. I tried the below mentioned code but that expands all the nodes children of tree instead of expanding one node children; Any help, suggestions or code example should be appreciated. Regards, Mubasher <mx:Script> <![CDATA[ public function treeChanged(event:Event):void { selectedNode=Tree(event.target).selectedItem as XML; if([EMAIL PROTECTED] == "My node"){ //myTree.expandItem(treeData,true); myTree.expandChildrenOf(myTree.dataProvider[0],true); } ]]> </mx:Script> <mx:XML id="treeData"> <node label="root Node"> <node label="My node"> <node label="myNode1" data="myNode1"/> <node label="myNode2" data="myNode2"/> <node label="myNode3" data="myNode3"/> </node> <node label="My Profile"> <node label="Change Password" data="password"/> <node label="Personal" data="personal"/> <node label="Contact Info" data="contact"/> </node> </node> </mx:XML> <mx:Tree id="myTree" width="100%" height="100%" labelField="@label" backgroundColor="#BEC7CC" showRoot="true" useHandCursor="true" dataProvider="{treeData}" change="treeChanged(event)"/>

