I was using the ViewStack, but that seemed to be my problem.  I 
implemented similar code to what you offered below.  Everything 
works great now.  Thank you for your patience and your help.

Kim
--- In [email protected], "Abdul Qabiz" <[EMAIL PROTECTED]> wrote:
Hi,

What exactly you want to do? Kindly give us some more information 
about.

I think, if you are not using ViewStack, then don't keep in your 
code.
There are better way to mimic...

Look at this code again, I think it is what you are looking for:

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";
xmlns="*">
  <mx:Script>
    import mx.containers.LinkBar;

    private var lastSelectedIndex:Number;

    public function enableDisableLink
(linkBar:LinkBar,index:Number):Void
    {
      linkBar.getChildAt(lastSelectedIndex).enabled = true;
      linkBar.getChildAt(index).enabled = false;
      lastSelectedIndex = index;
      
        //invoke the click code.
      onLinkClick(linkBar, index)
    }
    
    function onLinkClick(linkBar, index)
    {
        alert(index + " Link clicked");
    }
  </mx:Script>
  
  
 
  <mx:LinkBar disabledColor="#FF0000"   dataProvider="{['Inside 
Right',
'Back']}" click="enableDisableLink(event.target, event.index)"
creationComplete="enableDisableLink(event.target, 0)"/>

 
</mx:Application>



-abdul

 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] 
On
Behalf Of kreddington1
Sent: Saturday, July 02, 2005 4:15 AM
To: [email protected]
Subject: RE: [flexcoders] LinkBar

First of all, I want to thank everyone for their suggestions.  They 
are all great suggestions, but I am still stuck.  I have looked at 
past threads and they don't seem to be answering my question.  What 
I did was take the code from Abdul and modify it to mimic what I 
would like my code to do.  The problem is I cannot get the "click" 
to work.  It is not entering the function test when I click on the 
link.  The disabled color is working fine and the way i need it to 
work.  I now just need to get the click to work.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"; >
        <mx:Script>
        <![CDATA[
                function test() {
                        mx.controls.Alert.show("entered test");
                
        ]]>
        </mx:Script>
        
    <mx:LinkBar click="test()" borderStyle="solid" dataProvider="vs" 
disabledColor="0xFF0000" />
 
    <mx:ViewStack id="vs">
        <mx:HBox label="View 1">
            <mx:Label text="HBox 1" />
        </mx:HBox>
        <mx:HBox label="View 2"> 
            <mx:Label text="HBox 2" />
        </mx:HBox>
    </mx:ViewStack>
</mx:Application>


Thank you!
Kim
--- In [email protected], "Abdul Qabiz" <[EMAIL PROTECTED]> wrote:
Hi Kim,

disabled-color would apply on disabled link buttons. In your case,
button might not be getting disabled because LinkBar is not 
associated
with ViewStack. The LinkBar you see in FlexStyleExplorer might be
associated with ViewStack internally.

-abdul



-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] 
On
Behalf Of kreddington1
Sent: Saturday, July 02, 2005 3:02 AM
To: [email protected]
Subject: Re: [flexcoders] LinkBar

I tried using the 

LinkBar {
  disabled-color: #CCCCCC;
}

that this link recommends, but it doesn't seem to keep the color. I 
notice that it works in the FlexExplorer example, but I can't seem 
to get it working in my code.  What am I doing wrong?

Thanks,
Kim

--- In [email protected], Peter Baird <[EMAIL PROTECTED]> wrote:
disabledColor....

See http://weblogs.macromedia.com/mc/archives/FlexStyleExplorer.html

-peter


On 7/1/05 3:13 PM, "Kim Reddington" <[EMAIL PROTECTED]>
wrote:

> Is there anyway that I can have the text of the selected link 
label be a
> different color?  I know that there is textSelectedColor, but this 
only
> changes the color when you actually press down the mouse button.  
I would like
> the link to stay that color until another link is selected.
>  
> Thanks,
> Kim
>  
> 
> 
> --
> Flexcoders Mailing List
> FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com
> 
>   
>  
>  
> 
>  YAHOO! GROUPS LINKS
> 
> *  Visit your group "flexcoders 
<http://groups.yahoo.com/group/flexcoders> "
> on the web. 
> *   
> *  To unsubscribe from this group, send an email to:
> *  [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> *   
> *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service
> <http://docs.yahoo.com/info/terms/> .
> 
>  
> 
>
--- End forwarded message ---





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links
--- End forwarded message ---





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links
--- End forwarded message ---





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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to