`
sjkgxf7191
  • 浏览: 252309 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Tree的全部节点展开

    博客分类:
  • flex
阅读更多

大家都知道应该用expandChildrenOf(item,true),但是Flex2说明中很明确写道:
"If you set dataProvider and then immediately call expandChildrenOf() you may not see the correct behavior. You should either wait for the component to validate or call the validateNow() method. "

 

treePlayList.dataProvider = results;
// 刷新 非常必要
treePlayList.validateNow();
// 全部展开
treePlayList.selectedIndex = 0 ;
treePlayList.expandChildrenOf(treePlayList.selectedItem,
true );

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics