Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Flex Container VDividedBox layout container

Related Tutorials


 
 

Share on Google+Share on Google+

VDividedBox layout container

Advertisement
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

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 14, 2009

Related Tutorials

Discuss: VDividedBox layout container  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com