Flex 中的 Spark 表单项间隙
有没有办法更改 Spark 表单项与其内容(textinput、conbobox)之间的空间?我已经将表单的“间隙”属性设置为 0,但表单输入之间仍然留有大量垂直空间。
Is there a way to change the space between a spark form item and its content(textinput, conbobox)? I already set to 0 the "gap" property of the form, but still there is a lot of vertical space left between the form inputs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
将间隙设置为 -14 以使项目之间没有间隙
Set the gap to -14 to get no gap between the items
formItem 的 Spark 皮肤具有基于“列”设置的左/右变量。即 left="column1:10" 表示该元素距离第 1 列右侧 10 个像素。
因此,创建皮肤,减少“内容”列区域中的数字并检查它。
减少所有这些数字和间隙应该收紧,同时在表单布局中设置间隙。
The spark skin for formItem has left/right variables set based on "columns." I.e. left="column1:10" means the element is 10 pixels to the right of column 1.
So, create the skin, reduce those numbers in the "content" column area and check it.
Reducing all those numbers and the gap should tighten, along with setting the gap in form layout.
如果要更改每个 Spark Form Item 之间的垂直间隙,请基于 FormSkin 创建自定义皮肤并更改间隙属性 FormLayout。
如果要更改皮肤部件(labelDisplay、indicatorDisplay、helpContentGroup...)之间的水平间隙,则需要基于 FormItemSkin 创建自定义皮肤并更改 ConstraintColumn 值
If you want to change the vertical gap between each Spark Form Item, create a custom skin based on FormSkin and change the gap property FormLayout.
If you want to change the horizontal gap between skin parts (labelDisplay, indicatorDisplay, helpContentGroup, ...), you need to create a custom skin based on FormItemSkin and change the ConstraintColumn values
我按如下方式更改了自定义 FormItem 皮肤,它对我有用:
之前:
之后:
I changed in my custom FormItem skin as followed, and it worked for me:
before:
after:
FormItemLayout 中还没有 paddingLeft、paddingRight 等属性。
There are no paddingLeft, paddingRight etc. properties in FormItemLayout yet.