Home Flex Container VDividedBox layout container



VDividedBox layout container
Posted on: November 14, 2009 at 12:00 AM
VDividedBox Layout Container is similar to VBox Layout Container.

VDividedBox layout container

     

VDividedBox Layout Container is similar to VBox Layout Container. The difference is, it adds a divider between its child components which can be used to resize the area of container for the child components using mouse pointer. Hold the divider with left button of the mouse and move it, you will see the resized areas of the containers associated with the divider.

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" horizontalAlign="center" verticalAlign="middle" width="400" height="300">

<mx:Script>

<![CDATA[

import mx.collections.ArrayCollection;

import mx.controls.Alert;

[Bindable]

private var gridData:ArrayCollection;

private function initGridData():void {

gridData = new ArrayCollection();

gridData.addItem({Text: "Open source framework."});

gridData.addItem({Text: "Real time rich user-experience."});

}

private function addNew():void {

gridData.addItem({Text: addContent.text});

addContent.text="";

}

]]>

</mx:Script>

<mx:VDividedBox width="100%" height="100%">

<mx:DataGrid height="70%" width="100%" rowCount="6" dataProvider="{gridData}" creationComplete="{initGridData()}"/>

<mx:VBox height="30%" width="100%" backgroundColor="white" paddingLeft="10" paddingRight="10">

<mx:Label text="Enter text:" fontWeight="bold"/>

<mx:TextInput id="addContent" width="100%"/>

</mx:VBox>

</mx:VDividedBox>

<mx:Button label="Add" click="addNew()"/>

</mx:Application>

Output:

 

Watch in action:

Download Code

Related Tags for VDividedBox layout container:


More Tutorials from this section

Ask Questions?    Discuss: VDividedBox layout container  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.