Home Tutorial Flex Flex4 Components Spark Application Container in Flex4

 
 

Share on Google+Share on Google+
Spark Application Container in Flex4
Posted on: April 24, 2010 at 12:00 AM
Advertisement
Spark container is define in the spark.components package. The application container is the first container of the spark components. Basically it is layout container. you can start adding the contents without using another container or adding another containers in your application.

Spark Application Container in flex4:

Spark container is define in the spark.components package. The application container is the first container of the spark components. Basically it is layout container. you can start adding the contents without using another container or adding another containers in your application. The tag for the spark application container is <s:Application/> for use spark application container. Application container is the default container for the application. User can set size of that application container using width and height in pixel or  percentage values. You can set proreties backgroundColor, backgroundImage, backgroundSize, horizontalAlign, padding for the application container.

Example:

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

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

xmlns:s="library://ns.adobe.com/flex/spark"

xmlns:mx="library://ns.adobe.com/flex/mx" backgroundColor="0x000000">

<s:Button label="Submit" id="Sbutton"/>

</s:Application>

In this example you can see how to use Spark application container in flex application. And how to set property for that container.

Output:

Running Application:

To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.

Download this code

Advertisement

Related Tags for Spark Application Container in Flex4:


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: April 24, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com