3
votes

I am in need of a strange solution. I have one requirement in which I am displaying two components in a VBox. But on click of the main container I need to maximize that and need to display the components in horizontal. I was just wondering whether I can change the VBox to HBox and viceversa dynamically using actionscript or some other way.

Thanks in Advance, Cheers, PK

1

1 Answers

14
votes

Use a mx:Box and set the direction property dynamically.

MXML:

<mx:Box id="box" direction="vertical"/>

AS3:

box.direction = BoxDirection.HORIZONTAL;