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:
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.