Home Tutorial Flex Flex-components LinkBar in Flex

 
 

Share on Google+Share on Google+
LinkBar in Flex
Posted on: January 27, 2010 at 12:00 AM
Advertisement
In the current tutorial you will come to know about the LinkBar control of Flex. A LinkBar control is the collection of LinkButtons. We use this control when we need to control (specially display) the active child container. We generally use ViewStack container to display the child containers. The examples will help you to learn LinkBar more effectively

Flex LinkBar Control:

A LinkBar control is the collection of LinkButtons. We use this control when we need to control (specially display) the active child container. We generally use ViewStack container to display the child containers.

A LinkBar control is also used to control on its own. You can use <mx:dataProvider> and <mx:Array> tags in your examples. 

A LinkBar control creates LinkButton controls which are based on the dataProvider. <mx:LinkBar> tag is used to access  this control. Though it is a child class of Control, it does not use addChild( ) or removeChild( ) method. A LinkBar control does these activities automatically.

Example:

 

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

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">

<mx:Panel width="200" height="200" horizontalCenter="10" verticalCenter="10" title="LinkBar Example">

<mx:LinkBar dataProvider="{area}" horizontalAlign="center" id="linkbar" selectedIndex="1"/>

<mx:ViewStack id="area" x="306" y="118" height="100%" width="100%">

<mx:Canvas backgroundColor="#ccc000" id="adobe" label="Adobe" width="100%" height="100%">

<mx:Text text="Flex, ColdFusion, etc."/>

</mx:Canvas>

<mx:Canvas backgroundColor="#ccc000" id="sun" label="Sun" width="100%" height="100%">

<mx:Text text="Java, SPARC, JEE"/>

</mx:Canvas>

</mx:ViewStack>

</mx:Panel>

</mx:Application>

 

Output:

Advertisement

Related Tags for LinkBar in Flex:


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: January 27, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com