3 Replies Latest reply on Jun 9, 2010 8:47 AM by Flex harUI

    How to disable disclosureClosedIcon on a tree for a particular node ?


      How can I selectively disable the disclosureClosedIcon in  front of a particular tree node and leave the other tree nodes unaffected. If I do



      Then the whole tree is affected. Please look at the code below.




      <?xml version="1.0" encoding="utf-8"?>



      <?xml version="1.0" encoding="utf-8"?>










      import mx.events.ListEvent;


      import mx.controls.Alert;


      import mx.events.TreeEvent;




      public var selectedNode:XML;




      public function myTreeOpening(event:TreeEvent):void {


      //How to do the following selectively just for one node. For example if I want to just disable



      //further opening of "Marketing" node and leave the other two




      "Trying to disable the disclosureClosedIcon just for the Marketing node");











      <node label="Mail Box">

      <node label="Inbox">

      <node label="Marketing">

      <node label="Professional"/>

      <node label="Individual"/>

      <node label="team"/>


      <node label="Product Management">

      <node label="Professional"/>

      <node label="Individual"/>

      <node label="team"/>


      <node label="Sales">

      <node label="Professional"/>

      <node label="Individual"/>

      <node label="team"/>








      title="Tree Control Example" height="75%" width="75%" paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">



      <mx:Label width="100%" color="blue" text="Select a node in the Tree control."/>



      <mx:Tree id="myTree" width="50%" height="100%" labelField="@label"


      false" dataProvider="{treeData}" itemOpening="myTreeOpening(event)"/>