Jack Zach Tibbles
Jack Zach Tibbles

Reputation: 800

How do you style the gap in a VBox?

I would like to style the vertical gaps in a VBox I'm am using as a docking bar. Does someone know how to style the gaps to a colour?

Upvotes: 1

Views: 275

Answers (2)

Wu Zhou
Wu Zhou

Reputation: 1129

You can use setStyle function to style your VBox, for example:

<mx:Script>
    <![CDATA[
         private function changeHandler():void {
             vBox.setStyle("verticalGap", gap_number);
         }
        ]]>
</mx:Script>

<mx:VBox>
....
</mx:VBox>

gap_number is a variable.

Upvotes: 1

Sagar Rawal
Sagar Rawal

Reputation: 1442

You can do little bit of bluff with the code. Create a VBox and give its padding left,right,top and bottom to 5px and create another Vbox inside that Vbox.

You can use following code.

<mx:VBox paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5">

    <mx:VBox>

    </mx:VBox>

</mx:VBox>

hope this will gonna help to you. Have a Nice Day...

for further styling purpose you can use following link

http://examples.adobe.com/flex2/consulting/styleexplorer/Flex2StyleExplorer.html

Upvotes: 0

Related Questions