create a navigator from an action event

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default create a navigator from an action event

    hi..im a just a new user of FLEX, maybe only a week, and i have this exercise
    on creating a UI similar to explorer. a tree will be placed in the left side
    and the window on the left. what i want is when i click an item in the tree, a
    tab will appear in the left window. and then when another item is clicked, then
    another tab will appear. i have this code on creating a button when a tree is
    clicked:

    import mx.controls.Button;
    public var button1:Button;
    public function treeClick():void {
    button1 = new Button();
    canvas1.addChild(button1);
    }

    <mx:Tree id="tree1" x="0" y="0" width="100%" showRoot="true"
    labelField="@label" height="100%" click="treeClick()">

    but when i change it to a TabNavigator, it won't work...and also, how can i
    know what item in the tree is selected or clicked?

    schyst Guest

  2. Similar Questions and Discussions

    1. can't create action/droplet that doesn't put results on desktop
      I am ready to pull my hair out..... I am trying to create an action, and/or droplet, that will put the results in a designated folder, or even...
    2. Can we fire a user control event when the user does the action
      Can we fire a user control event when the user does the action not in the webservers or custom control event? What actaully I want is to handle a...
    3. Create an action form the history
      I did a search and got no results, but I'm sure the subject has been brought up before. Is there any way to create an action from the history...
    4. How to create C# Dynamic Control Event Hander
      I am creating an web control within a class and instance the class within my code behind and use its methods to dynamically generate page contents....
    5. How to Create a user control with a event property?
      I want to create a usercontrol and can set Click Event Function to it at desined-time,just as <myprefix:myLinkButton ... OnClick="ClickFunction"...
  3. #2

    Default Re: create a navigator from an action event

    Declale the TabNavigator im mxml, empty, with an id, say "tn1".

    Then create your content, which must be a container:
    var vb1 = new VBox;
    tn1.addChild(vb1);

    When a node is clicked, the Tree dispatches a click event. A handler for this
    event can reference the clicked node using event.target. Also, the
    Tree.selectedItem will be a reference to the selected node.

    Tracy


    ntsiii Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139