简体   繁体   English

Flex:是否有可能在不疯狂的情况下设计Flex应用程序的样式?

[英]Flex: is it possible to style a Flex app without going insane?

Are there any libraries out there which will help me style a Flex application without going insane? 有没有可以帮助我设计Flex应用程序而又不会发疯的库?

For example, is there any "accepted" way to set an element's size/position without hard-coding it into each element? 例如,是否有任何“可接受的”方法来设置元素的大小/位置而无需将其硬编码到每个元素中?

The width, height and position of elements are not styles, they are properties. 元素的宽度,高度和位置不是样式,而是属性。 Unfortunately they can't be set via a stylesheet. 不幸的是,无法通过样式表进行设置。

What you could do is extend one of the Container classes and override the childrenCreated() method, access the elements in the "children" Array and set the values you want. 您可以做的是扩展Container类之一,并重写childrenCreated()方法,访问“ children” Array中的元素并设置所需的值。

You can use VBox and HBox components that layout the children either vertically or horizontally. 您可以使用垂直或水平排列子级的VBox和HBox组件。 I would avoid nesting this too much because it will affect your applications performance. 我会避免嵌套太多,因为这会影响您的应用程序性能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM