I don’t see that behavior. Try the
sample app below. Select a node, the node label will display in the Label
field below. CTRL-click that node to deselect, and the Label control becomes
empty. <?xml version="1.0"
encoding="utf-8"?> <mx:Application
xmlns:mx="http://www.macromedia.com/2003/mxml" width="600"
height="400"> <mx:Script><![CDATA[ // Variable that contains the
data provider. var myDP : Array; // Function to initialize the
data provider. function initTree() { myDP = new
Array(); myDP.addItem({label:"one"}); myDP.addItem({label:"two"}); myDP.addItem({label:"three"}); myTree.dataProvider
= myDP; } private function
onChange(oEvent:Object):Void { lblSelectedNode.text
= oEvent.target.selectedNode.getProperty("label"); } ]]></mx:Script> <mx:Tree id="myTree"
initialize="initTree()" change="onChange(event)"/> <mx:Label
id="lblSelectedNode" /> </mx:Application> From: Hi, I noticed that the tree’s change event does not work
as expected ( the same way as for example in DataGrid ). When a user selects a
node on a tree, the tree sends change event properly, as in DataGrid. But when the
user deselects (is that a word?) a node by clicking it with CTRL –key
down, it does not send change event (as datagrid does). This causes real
problems, since I get no info that the there are no nodes now selected ( as
user has done something I can not follow) and my buttons that should be
disabled when no nodes are selected, stay enabled -> leads to errors. Is there a fix or a nice workaround on this issue? Is this a feature or a bug in the Tree? -- Yahoo! Groups Links
|
- RE: [flexcoders] Tree change event Tracy Spratt
- RE: [flexcoders] Tree change event Mika Kiljunen
- RE: [flexcoders] Tree change event Tracy Spratt
- [flexcoders] Re: Tree change event alex_harui
- RE: [flexcoders] Re: Tree change event Mika Kiljunen
- Re: [flexcoders] Tree change event Manish Jethani
- RE: [flexcoders] Tree change event Mika Kiljunen