1 Reply Latest reply on Oct 16, 2007 1:04 PM by Gregory Lafrance

    independently styled linkbar items?

    oxide_reaction
      Does anyone know if it's possible to style linkbar items independently? If so, how?

      Thanks
        • 1. Re: independently styled linkbar items?
          Gregory Lafrance Level 6
          This may help:

          <?xml version="1.0"?>
          <!-- controls\bar\LBarSimple.mxml -->
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
          <mx:Script>
          <![CDATA[
          private function init():void {
          for(var x:uint = 0; x < lb.numChildren; x++){
          if(x % 2 == 0){
          mx.controls.LinkButton(lb.getChildAt(x)).setStyle("fontSize", "20");
          }
          }
          }
          ]]>
          </mx:Script>

          <mx:LinkBar id="lb" borderStyle="solid" creationComplete="init()"
          itemClick="navigateToURL(new URLRequest(' http://www.adobe.com/' +
          String(event.label).toLowerCase()), '_blank');">
          <mx:dataProvider>
          <mx:String>Flash</mx:String>
          <mx:String>Director</mx:String>
          <mx:String>Dreamweaver</mx:String>
          <mx:String>ColdFusion</mx:String>
          </mx:dataProvider>
          </mx:LinkBar>
          </mx:Application>