Tile Layout Container in Flex4


 

Tile Layout Container in Flex4

The Tile Layout Container is a MX container. You can arrange the components in horizontal rows and vertical columns.

The Tile Layout Container is a MX container. You can arrange the components in horizontal rows and vertical columns.

Tile Layout Container in Flex4:

The Tile Layout Container is a MX container. You can arrange the components in horizontal rows and vertical columns. You can use the direction property for determine the layout. There are two values of direction property vertical and horizontal. The default value of direction property is horizontal. Flex arrange the components in a square Format. If you use 4 components in a Tile container Flex arrange two components wide and two components high.
The Tag of Tile Layout container is <mx:Tile>.

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" minWidth="955" minHeight="600">

<s:Panel title="Tile Layout Container Example">

<mx:Tile id="tile"

direction="horizontal"

borderStyle="solid"

paddingTop="5" paddingBottom="5"

paddingRight="5" paddingLeft="5"

verticalGap="10" horizontalGap="10">

<s:TextArea id="textarea1" text="TextArea1" height="50" width="75"/>

<s:TextArea id="textarea2" text="TextArea2" height="50" width="75"/>

<s:TextArea id="textarea3" text="TextArea3" height="50" width="75"/>

<s:TextArea id="textarea4" text="TextArea4" height="50" width="75"/>

<s:TextArea id="textarea5" text="TextArea5" height="50" width="75"/>

<s:TextArea id="textarea6" text="TextArea6" height="50" width="75"/>

</mx:Tile>

</s:Panel>

</s:Application>

In this example you can see how we can use a Tile Layout Container control in Flex4.

Output:

Running Application:

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

Download this code

Ads