The container provides content area that contains its child component. The size of the content area is set by the container. If you want to create a application then you require at least one container and after that you can added one or more child containers of the main container. These child container also contain many of child container for developing a typical application.
There are two type of container in Flex 4 one is Spark Containers and other is MX containers but we have discuss about container.
In this example you can see how to use container in the application.
<?xml version="1.0" encoding="utf-8"?>
xmlns:mx="library://ns.adobe.com/flex/mx"> <s:Panel title="Container Example "> <s:Button label="Submit" id="Sbutton"/> </s:Panel>
This example have two Spark Container one
is application container and other is Spark panel container. The application
container is parent container that contain panel container as a child. The user
can set width and height properties for a container to define the content area
for the childs component as you can see in this example. The user can set the
layout for containers. The container have properties to set sizing and position
for the components. There are two
type of containers used in typical application one is main container and other is child's container . In this example you can see application container is main container and panel container is child container.
To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.
Posted on: April 24, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles