大家都知道应该用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. "

    所以代码如下:
            
Tree的全部节点展开treePlayList.dataProvider=results;
Tree的全部节点展开
//刷新
Tree的全部节点展开
treePlayList.validateNow();
Tree的全部节点展开
//全部展开
Tree的全部节点展开
treePlayList.selectedIndex=0;
Tree的全部节点展开treePlayList.expandChildrenOf(treePlayList.selectedItem,
true);

相关文章:

  • 2021-06-07
  • 2021-10-26
  • 2021-08-31
  • 2021-08-06
  • 2021-08-14
  • 2021-09-02
猜你喜欢
  • 2022-12-23
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案