0 Replies Latest reply on Apr 19, 2007 5:02 AM by Ashish Mishra

    Regarding mx:Tree onselect event of childs

    Ashish Mishra
      Hi Frens,

      I had created simple application, Now I had a mx:Tree component here, All the options i m providing to this tree using the XML ListCollection. Now I want when i click one of the options of tree one particular view should be made visible, so how can i get the value of a particular option in script. What should be script for this:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*">

      <mx:XMLListCollection id="MessageOptions" source="{Folders}"/>
      <mx:XMLList id="Folders">
      <folder label="Mail">
      <folder label="AllMsd" />
      <folder label="WRITE" />
      <folder label="PrivateMSg" />
      <folder label="Deleted" />
      <mx:HDividedBox x="30" y="60" height="100%" width="100%" >
      <mx:ApplicationControlBar id="acbDashboard" x="20" y="10" height="90%" width="20%" borderThickness="4" borderColor="#41244" verticalAlign="middle">
      <mx:Tree id="tree1" dataProvider="{MessageOptions}" labelField="@label" showRoot="true" width="100%" height="100%"/>
      <mx:VDividedBox id="acbMain" x="{acbDashboard.width+acbDashboard.x+10}" y="10" height="90%" width="78%" >
      <mx:ApplicationControlBar id="acbInbox" width="95%" height="60%" >

      <local:MyVBox id="AllMsges" width="100%" height="100%" visible="true">
      <local:MyCompose id="vbWriteMsg" visible="false">
      <local:MyCompose id="vbMyMsg" visible="false">
      <local:MyCompose id="vbDeletedMsg" visible="false">

      <mx:ApplicationControlBar id="acbDetails" width="95%" height="40%">
      <mx:VBox width="100%" height="100%">
      <mx:Label text="MESSAGE" width="100%" height="20" fontWeight="bold"/>
      <mx:Spacer height="2" />
      <mx:TextArea id="txtMessage" width="98%" height="80%" editable="false" />

      Plz tell me.