若要在branch click後展開,參考code如下:
在tree 的itemClick event property做一個handlder function
protected function userTree_itemClickHandler(event:ListEvent):void { var item:Object = Tree(event.currentTarget).selectedItem; if (userTree.dataDescriptor.isBranch(item)) { userTree.expandItem(item, !userTree.isItemOpen(item), true); } }
沒有留言:
張貼留言