设置布局间隙
我通常这样设置布局,
<s:Group>
<s:layout>
<s:VerticalLayout gap="10"/>
</s:layout>
</s:Group>
但不知道如果我想使用 new VerticalLayout 如何指定间隙
I usually set the layout like this
<s:Group>
<s:layout>
<s:VerticalLayout gap="10"/>
</s:layout>
</s:Group>
but not sure how to specify the gap if I want to use new VerticalLayout
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
VerticalLayout 构造函数没有任何参数,因此您无法将其作为布局属性的一部分在 MXML 中内嵌执行。创建布局后,您必须在布局上设置间隙属性。也许在creationComplete处理程序中,执行如下操作:
您甚至可以内联执行此操作:
The VerticalLayout constructor does not have any parameters, so you won't be able to do this in-line in MXML as part of the layout property. You'll have to set the gap property on the layout after creating it. Perhaps in a creationComplete handler, do something like this:
You can probably even do this in-line: