Whenever I add a node to my tree, through its XML data source, it expands all the closed branches.
The code for adding is pretty straight-forward:
AddNode(xmllTree:XMLList, xmlNew:XML):void {
xmllTree.appendChild(xmlNew);
}
And that's it. It does the same thing when I remove nodes.
Yes, I tried handling the mx.events.TreeEvent.ITEM_OPEN
event, but despite the promises of Adobe's documentation , that event is not thrown under these circumstances >=/
Is there any other way to prevent this, short of going through the whole list, recording all the closed branches, then closing them again? (Which I'm not convinced would work anyway)
Flex 3.5 SDK here.
...实际上,这可能是由原始开发人员放入的mx:Tree
愚蠢的openItems="{objXML..node}"
成员引起的。我不知道他们在想什么。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.