Thanks Joan,

Regards,
Hank

On 11/1/06, Joan Lafferty <[EMAIL PROTECTED]> wrote:

There is no specific style on LinkBar that you can use. Instead, since the LinkBar is just a parent for a bunch of LinkButton's, you can use getChildAt on your LinkBar to control the styles on the individual LinkButtons.

 

Here is some code you can use to change the color of text of your selected item:

 

private function changeColor() : void {

    var n:int = mylb.numChildren;

    var lb1:*;

    ta.text = 'hello';

    for(var i:int=0; i < n; i++)

    {

        lb1 = mylb.getChildAt(i);

                lb1.setStyle('color', 0x000000);

    }

 

    lb1 = mylb.getChildAt(mylb.selectedIndex);

    lb1.setStyle('color', 0xFF0000);

}

 

 

<mx:LinkBar id="mylb" itemClick="changeColor()">

   <mx:dataProvider>

      <mx:String>Yes</mx:String>

      <mx:String>No</mx:String>

      <mx:String>Maybe</mx:String>

   </mx:dataProvider>

</mx:LinkBar>

 


From: [email protected] [mailto:[email protected]] On Behalf Of hank williams
Sent: Wednesday, November 01, 2006 9:57 AM
To: [email protected]
Subject: [flexcoders] using a linkbar with a viewstack... how can you indicate current selection

 

a linkbar is a recommended way to control a viewstack. But I want to
be able to show the user the currently selected view. I am not clear
whether the linkbar is supposed to allow this. When I try to initially
set the selectedIndex to 0 I get an error indicating that it is out of
range.

I know I could use a tabBar, but I like the simple blocks of text
without the "tabby" look and feel.

So I guess my question is, is it possible to use the linkbar where one
item is, for example, a different color than the others, indicating
that that is the currently selected item?

Hank


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to