在Flex 4中,如果节点展开,如何动态更改Tree rowCount?

发布于 2024-10-09 11:04:30 字数 260 浏览 0 评论 0原文

树的最小行数应为 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文