4 Replies Latest reply on Jul 26, 2011 8:45 AM by CenturyMan1979

    How to search a tree control.


      Hi all,


      I just started learning Flash Builder not too long ago, quite a learning experience I have to say. I am a little lost and woul like some help from you guys.


      I am trying to build a menu tree that will display and image and information about that image when the corresponding node is selected.

      I also want to have the menu tree searchable, I looked at a few examples of tree controls to get some ideas but I keep hitting brickwalls left and right.



      I started over few times trying to follow some of the examples. Right now, I only have the visual elements, please see the code below.


      Thank you so much in advance.



      Here's the code I have so far:


      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                        xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="960" minHeight="560" backgroundColor="#FFFFFF" width="960" height="560">
      <mx:HDividedBox y="80" height="415" x="25">
           <s:Panel x="20" y="95" width="240" height="415">
                <s:TextInput x="10" y="-25" height="20" contentBackgroundAlpha="1.0" borderAlpha="1.0" textAlign="left" fontWeight="normal" text="Search" focusColor="#70B2EE" fontSize="10" color="#646464"/>
                <mx:Tree id="tree"
                          x="10" y="5" width="220" height="370" borderVisible="false" color="#787878">
                <s:Button x="160" y="-25" label="Find" fontWeight="bold" fontSize="10"/>
           <s:Panel x="275" y="95" width="660" height="415">
                <mx:SWFLoader id="swfLoader"
                     x="0" y="0" width="660" height="190"/>
                <mx:Text width="639" id="treeSelectedData"
                           height="169" x="9" y="203"/>