在 flex3 中调整 TabNavigator 中的内容大小
你好,我正在 flex 3 中的 tabNavigator 上工作。 我里面有tileList。选项卡中的内容是动态生成的,因此我无法提供明确固定的高度和宽度。 我需要根据其中的内容调整选项卡的大小。 为了调整选项卡的大小,我启用了 tabNavigator 的“resizeToContent”属性。由于某种原因,它没有按预期调整大小。
有人可以建议我摆脱它的方法吗? 谢谢
嘿,谢谢 Gregor 的回复,
“resizeToContent”对于 tabNavigator 中的其他子项效果很好,但当我在 tabNavigator 中使用tileList 作为子项时失败,此时tileList 调整到其默认大小(仅 4 行可见)。所以我想知道是否有任何方法可以强制tileList显示其所有项目,而不将滚动条放在其默认大小之后。
只需使creationComplete 上的大小无效,就会为我调整所有选项卡的大小。我在 tabNavigator 中有 n 个选项卡,因为用户可以在其中添加选项卡和内容。 您能否解释一下,我怎样才能实现这一目标。 我对 Flex 很陌生,所以只是对它的行为感到困惑,并长期以来一直在解决这个问题。
Hi I am working on tabNavigator in flex 3.
I have tileList within it. Contents in the tab comes dynamically so I cannot provide explicitly fixed height and width.
I need to resize the tabs depending on the contents within it.
To resize the tabs I have enabled 'resizeToContent' property of tabNavigator.For some reason it is not resizing as expected.
Could anybody please suggest me the way out of it.
Thanks
Hey thanks Gregor for you reply,
'resizeToContent' works fine for other child items in tabNavigator but fails when I use tileList as child in tabNavigator that time tileList resizes to its default size(4 rows are only visible). So i was wondering if there any way so that I can force tileList to display all its items without putting scrollbars after its default size.
just by invalidating size on creationComplete ,will that resize all tabs for me. I am having n-number of tabs in tabNavigator as user can add tabs and content within it.
Could you please explain me, how can I achieve this.
I am new to flex so just getting confused with its behaviorand struggling with this issue from long time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
resizeToContent 仅在用户更改选项卡时才起作用。如果您希望在添加内容后调整选项卡的大小,则需要侦听适当的事件(可能是creationComplete)并使TabNavigator 的大小无效。这将给它一个调整自身规模的机会。
resizeToContent only works when the user changes tabs. If you want the tab to resize once the content has been added, you need to listen for the appropriate event (creationComplete probably) and invalidate the size of the TabNavigator. That will give it an opportunity to resize itself.