动态地将VBox更改为HBox

Ano*_*oop 3 apache-flex actionscript flex3 actionscript-3

我需要一个奇怪的解决方案.我有一个要求,我在VBox中显示两个组件.但是在点击主容器时我需要最大化它并且需要在水平方向上显示组件.我只是想知道我是否可以使用actionscript或其他方式动态地将VBox更改为HBox和反之亦然.

在此先感谢,干杯,PK

Bae*_*orn 14

使用a mx:Boxdirection动态设置属性.

MXML:

<mx:Box id="box" direction="vertical"/>
Run Code Online (Sandbox Code Playgroud)

AS3:

box.direction = BoxDirection.HORIZONTAL;
Run Code Online (Sandbox Code Playgroud)