• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How to search a tree control.

New Here ,
Jul 21, 2011 Jul 21, 2011

Copy link to clipboard

Copied

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:s="library://ns.adobe.com/flex/spark"                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="960" minHeight="560" backgroundColor="#FFFFFF" width="960" height="560"> <fx:Declarations> </fx:Declarations>                   <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">           </mx:Tree>           <s:Button x="160" y="-25" label="Find" fontWeight="bold" fontSize="10"/>      </s:Panel>      <s:Panel x="275" y="95" width="660" height="415">           <mx:SWFLoader id="swfLoader"                            scaleContent="true"                x="0" y="0" width="660" height="190"/>           <mx:Text width="639" id="treeSelectedData"                      height="169" x="9" y="203"/>      </s:Panel> </mx:HDividedBox> </mx:Application>

Views

535

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 25, 2011 Jul 25, 2011

Copy link to clipboard

Copied

Any takers? C'mon!

Please let me know if I need to provide more information.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 25, 2011 Jul 25, 2011

Copy link to clipboard

Copied

You should take a look at the help documentation about the tree component. They have an example code at the bottom that shows how to load in data to the tree and how to perform actions when a node in the tree is selected. Below is a link to the help documentation on the tree component.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/Tree.html?filter_flex=4.5.1&filter_flashplayer=10.3&filter_air=2.6

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 26, 2011 Jul 26, 2011

Copy link to clipboard

Copied

@CenturyMan1979

Thank you for the link, I can't find how to search a tree though. Can you or anyone else shed some light on that?

Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 26, 2011 Jul 26, 2011

Copy link to clipboard

Copied

LATEST

Here is an article that talks about searching through XML data.

http://www.kirupa.com/web/xml/examples/searchbestof.htm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines