Hi Mic,

Just make these changes:

newItem.tabLabel = [EMAIL PROTECTED]();

<mx:TabBar id="myTabBar" labelField = "tabLabel"/>

-TH

--- In [email protected], "Mic" <[EMAIL PROTECTED]> wrote:
>
> What is the syntax for the labelField please? I get the 4 tabs but no
> labels. As always, TIA,
>
> Mic.
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> layout="vertical"
> initialize="init()" >
> <mx:Script>
> <![CDATA[
> import mx.collections.ArrayCollection;
> import mx.collections.XMLListCollection;
>
> public var tabXML:XML =
> <tab_bar>
> <tab label="Tab1"/>
> <tab label="Tab2"/>
> <tab label="Tab3"/>
> <tab label="Tab4"/>
> </tab_bar>;
>
> [Bindable] public var tabArray:ArrayCollection = new ArrayCollection;
>
> public function init():void {
> createTabList();
> }
>
> public function createTabList():void {
> for each (var node:XML in tabXML.tab) {
> var newItem:Object = new Object();
> newItem.tabLabel = [EMAIL PROTECTED];
> tabArray.addItem(newItem);
> trace([EMAIL PROTECTED]);
> }
>
> // myTabBar.labelField = "@tabLabel";
> myTabBar.dataProvider = tabArray;
>
> }
>
> ]]>
> </mx:Script>
>
> <mx:TabBar id="myTabBar" labelField = "@tabLabel" />
>
> </mx:Application>
>


Reply via email to