开发者

How do i use actionscript 3 to create mxml controls dynamically and automatically taking care of layout

I want to use actionscript 3 to create mxml(flex 4) cont开发者_高级运维rols dynamically and automatically taking care of layout. For example, if I want to put 6 buttons and a s:label in a layout container by just specifying the positioning of the container and not the locations of individual controls. This would help creating the mxml code by programming and not by hand.


If you want to use automatic layouts, you just need to specify the layout type of the container.

You can just use .addElement(element) to add controls to the container and layout will look after how they are automatically laid out.

Read more about layouts here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜