在Flex 4中,如果节点展开,如何动态更改Tree rowCount?
树的最小行数应为 4,最大行数为 10(超过该行数应显示滚动条)。因此,我有一棵 rowCount="4" 的树,我希望 rowCount 根据当前扩展的节点更改为“10”。在调试中,我可以看到我可以使用的两个树属性: - 集合长度 - numberOfRows
但这些无法从外部访问,因此我无法找到一种方法来了解树是否已展开。
我该怎么做?
我是否必须创建一个继承自 Tree 的自定义 MyTree?我试图避免这种情况...
谢谢, 努诺
The tree should have a minimum row count of 4 and a maximum of 10 (beyond which it should display the scroll bars). So, I have a tree with rowCount="4" and I want rowCount to change up to "10" depending on the currently expanded nodes. In debug I can see two of the tree's properties which I could use:
- collectionLength
- numberOfRows
But these are not accessible from outside so I can't find a way to understand if the tree is expanded or not.
How can I do this?
Will I have to create a custom MyTree which inherits from Tree? I was trying to avoid this...
Thanks,
Nuno
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定您是否已经弄清楚了这一点,但这应该是您确定打开的内容所需的全部http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/Tree .html?filter_flex=4.1&filter_flashplayer=10.1&filter_air=2#openItems
Not sure if you already got this figured out but this should be all you need to determine what's open http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/Tree.html?filter_flex=4.1&filter_flashplayer=10.1&filter_air=2#openItems