Tree control parent node label

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

  1. #1

    Default Tree control parent node label

    The following code works fine (except the part in caps, which isn't code).
    Suggestions?

    private function changeEvt(event:Event):void {
    var theData:String = ""
    if (event.currentTarget.selectedItem.@value) {
    theData = " Data: " + event.currentTarget.selectedItem.@value;
    }
    trace(event.currentTarget.selectedItem.@label + theData);

    //trace(NEED PARENT NODE LABEL HERE IF IT EXISTS);
    }

    John Hall Guest

  2. Similar Questions and Discussions

    1. Tree RTE when closing empty node
      I'm using Flex 2. I have a tree with an XML list collection as data provider. I have used isBranch="true" in the XML to indicate empty nodes that...
    2. remove tree node
      This sounds kind of stupid but i've trying to remove a node from a tree... and I can't lol The treeDataProvider originates in a XML feed and I try...
    3. Cell Renderer for Tree Node
      How can I programmatically set a cell renderer for a tree node? Can anyone provide an example?
    4. tree node
      Hi, I have a tree with say parent1 and child1 . To access the label of either child or parent I am using...
    5. Search non-XML tree for a node and highlight it?
      (using the non-XML FTree component that came with the "Flash UI Components Set 2" component set...) Is there a way to search the (non-XML) FTree...
  3. #2

    Default Tree control parent node label

    The following code works fine (except the part in caps, which isn't code).
    Suggestions?

    private function changeEvt(event:Event):void {
    var theData:String = ""
    if (event.currentTarget.selectedItem.@value) {
    theData = " Data: " + event.currentTarget.selectedItem.@value;
    }
    trace(event.currentTarget.selectedItem.@label + theData);

    //trace(NEED PARENT NODE LABEL HERE IF IT EXISTS);
    }

    John Hall Guest

  4. #3

    Default Re: Tree control parent node label

    OK. So I stopped looking too soon. In my case:

    trace(browserTree.selectedItem.parent().@label);
    John Hall 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