Darron, I think its the same one. I'll report it here for others. Basically,
if you set the Accordion headerStyleName property to a defined class
selector then the behavior you describe occurs. If you remove the
headerStyleName attribute or remove the class definition then it works.

Dustin, I like that method. :)

Here is example code to compare against:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute"
   creationComplete="init()">

<mx:Script>
   <![CDATA[

   [Bindable]
   [Embed(source="images/Box.png")]
   public var boxIcon:Class;

   [Bindable]
   [Embed(source="images/CheckBox.png")]
   public var checkboxIcon:Class;

   public function init():void {

       accordion1.getHeaderAt(0).setStyle('icon', boxIcon);
       accordion1.getHeaderAt(1).setStyle('icon', checkboxIcon);
       accordion1.getHeaderAt(2).setStyle('icon', checkboxIcon);

   }

   ]]>
</mx:Script>

<mx:Style>
   .myAccordionHeaderStyle {

   }
</mx:Style>
<mx:Box width="380" horizontalAlign="left" verticalGap="12"
   verticalScrollPolicy="off" horizontalScrollPolicy="off">
<!-- REMOVE headerStyleName property and test again-->
   <mx:Accordion id="accordion1" width="100%" color="#000000"
fontFamily="menuHeaderFont"
       fontSize="14" resizeToContent="true" fontWeight="bold"
       creationPolicy="all"
       historyManagementEnabled="false"
       headerStyleName="myAccordionHeaderStyle"
       paddingRight="0">
       <mx:VBox label="HEADER ONE" width="100%" verticalScrollPolicy="off">
           <mx:Text>
               <mx:htmlText>
                   <![CDATA[
                       Here is some test text.
                   ]]>
               </mx:htmlText>
           </mx:Text>
      </mx:VBox>
       <mx:VBox label="HEADER TWO" width="100%" verticalGap="47">
           <mx:Text>
               <mx:htmlText>
                   <![CDATA[
                       Here is some test text.
                   ]]>
               </mx:htmlText>
           </mx:Text>
      </mx:VBox>
       <mx:VBox label="HEADER THREE" width="100%"
verticalScrollPolicy="off">
           <mx:Text>
               <mx:htmlText>
                   <![CDATA[
                       Here is some test text.
                   ]]>
               </mx:htmlText>
           </mx:Text>
       </mx:VBox>
   </mx:Accordion>
</mx:Box>
</mx:Application>


On 12/13/06, Darron J. Schall <[EMAIL PROTECTED]> wrote:

I think you've actually stumbled on a bug that I submitted a couple
months ago -- where the icon set in the last accordion header gets
applied to all previous headers, or something like that.  I narrowed it
down to a reproducible test case, and I believe Adobe was able to fix it
(as part of the upcoming 2.0.1 release).

I don't have that test case anymore, but it sounds like exactly the same
thing I ran into when I filed the bug.  I don't remember if there was a
workaround or not... sorry.

-d

dorkie dork from dorktown wrote:
>
> Er, I created a simplified example and got that to work. So there must
> be some gremlins in my code somewhere. I checked the source and did
> not see an iconFunction.
>
> On 12/13/06, * dorkie dork from dorktown*
> <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Does the Accordion have an iconFunction? Similar to the
>     iconFunction used in the Tree and List controls.
>
>     For example, this code is supposed to set the icon for headers 0
>     and 1 but each statement sets the icon across all headers.
>
>         [Bindable]
>         [Embed(source="images/Company-Icon.png")]
>         public var companyIcon:Class;
>
>         [Bindable]
>         [Embed(source="images/Market-Icon.png")]
>         public var marketIcon:Class;
>
>         // in init
>         navigationMenu.getHeaderAt(0).setStyle('icon', companyIcon);
>         navigationMenu.getHeaderAt(1).setStyle('icon', marketIcon);
>
>
>
>



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




Reply via email to