views:

114

answers:

1

Hi All,

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

+11  A: 

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

MXML:

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

AS3:

box.direction = BoxDirection.HORIZONTAL;
Baelnorn
Great answer dude... Am very sorry, I want to vote up more than one time :) Thanks very much
Anoop