Kenny,

 

You will need to cast the child to a Button. In the future, include the compiler error in your message. This will help the forum isolate your problem.

 

HTH,

Jason

 

<?xml version="1.0" encoding="iso-8859-1" ?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

<mx:Script>

            public function changeStyle():void

            {

                        Button(bb.getChildAt(0)).setStyle("borderColor",0x23FF33);

            }

 

</mx:Script>

 

 

<mx:ButtonBar id="bb" dataProvider="{['won', 'too', 'tree', 'for']}"/>

 

<mx:Button click="changeStyle()"/>

 

 

</mx:Application>

 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of lostinrecursion
Sent: Monday, August 28, 2006 9:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ToggleButtonBar: Styling Individual Button

 

Jason,

How do you iterate through the ButtonBar? Meaning I notice the
following code does not work and reports an error in Flex:

myButtonBar.getChildAt(0).setStyle("backgroundColor", 0x990000);

Thank you. (I will also check out the documentation on this as well)

-Kenny

__._,_.___

--
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


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to