1 Reply Latest reply on Dec 28, 2010 10:28 AM by Tanu Jain

    Text and two images in accordion header?????

    rck_Cena77 Level 1

      how to insert two images in the accordion header

      1) indicates the accordion image constant

      2) if the accordion's state is up or down.

       

      i tried using headerStyleName,

       

      <mx:Accordion     headerStyleName="customAccordionHeadStyles">

                  <mx:headerRenderer>
                             <fx:Component>
                                   <mx:Button fontWeight="normal"
                                     disabledColor="#000000"
                                     labelPlacement="left"
                                     textAlign="left"
                                     />
                             </fx:Component>
                  </mx:headerRenderer>

                   <mx:VBox label="Some text here    " paddingTop="0"
                           backgroundColor="#ebfaff" icon="@Embed('assets/goodIcon.png')"
                          // one more icon or skin state here to show it was up or down
                           verticalScrollPolicy="off"
                           horizontalScrollPolicy="off"
                          / >

       

       

                   <mx:VBox label="Some text here    " paddingTop="0"
                            backgroundColor="#ebfaff" icon="@Embed('assets/badIcon.png')"
                           // one more icon or skin state here to show it was up or down
                            verticalScrollPolicy="off"
                            horizontalScrollPolicy="off"
                            />

      </mx:Accordion>

       

      thanks for reading.

        • 1. Re: Text and two images in accordion header?????
          Tanu Jain Level 2

          You can use "CanvasButtonAccordionHeader" to make custom Accordion header  (HeaderRenderer) and add text/images as per your requirements.

           

              <mx:headerRenderer>
                  <fx:Component>
                      <components:HeaderRenderer  />
                  </fx:Component>
              </mx:headerRenderer>

           

          One needs to add "flexlib.swc" to access "CanvasButtonAccordionHeader".

           

          Hope this helps!

           

          --Tanu