HBox Container in Flex4


 

HBox Container in Flex4

The HBox container is a MX component. There is no Spark Component. The HBox container is used for horizontal layout in which the children components are arranged in horizontal manner.

The HBox container is a MX component. There is no Spark Component. The HBox container is used for horizontal layout in which the children components are arranged in horizontal manner.

HBox container in Flex4:

The HBox container is a MX component. There is no Spark Component. The HBox container is used for horizontal layout in which the children components are arranged in horizontal manner. You can use Spark Horizontal layout instead of HBox Container. The tag of HBox Container is <mx:HBox>.

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="HBox Container Example"

width="454" height="194"

contentBackgroundColor="#000000">

<mx:HBox borderStyle="solid"

paddingTop="10"

paddingBottom="10"

paddingLeft="10"

paddingRight="10"

x="21" y="20"

backgroundColor="#2F8F95"

borderAlpha="3"

borderColor="#230909"

cornerRadius="20">

<s:TextInput id="txt" text="User Name" color="#ffffff" fontFamily="verdana"/>

<mx:Button id="btn" label="Button 1"/>

<mx:Button id="btn1" label="Button 2"/>

<mx:ComboBox id="comb"

prompt="Select Item"

color="#ffffff"

chromeColor="#000000"

cornerRadius="10"

direction="rtl"

symbolColor="#FFFFFF"

fontFamily="verdana">

<mx:ArrayList>

0

<fx:String>Item 1</fx:String>

<fx:String>Item 2</fx:String>

<fx:String>Item 3</fx:String>

1

<fx:String>Item 4</fx:String>

</mx:ArrayList>

</mx:ComboBox>

2

</mx:HBox>

</s:Panel>

</s:Application>

3

Output:

Running Application:

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

Download this code

4

Ads