views:

545

answers:

2

In my application i want checkbox on the accordion ,so is it possiable to set checkbox ? if it is possiable How can i identified child ?

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
 width="100%" height="100%">
      <mx:Accordion>
                <mx:headerRenderer>
                        <mx:Component>
                                <mx:CheckBox label="myCkb"
/>
                        </mx:Component>
                </mx:headerRenderer>
                <mx:Panel title="Content1" label="P1" width="200"
height="200" />
                <mx:Panel title="Content2" label="P2" width="200"
height="200" />
                <mx:Panel title="Content3" label="P3" width="200"
height="200" />
        </mx:Accordion>
</mx:Application>
A: 

What you meen by "insert a checkbox inside a accordion header". Add a CheckBox icon? Add a CheckBox funcionality?

Probably you need new component like this - "Accordion with Icons". Look how it's done. You must create your own CheckBox logic or use CheckBox component instead of a icon.

Konrad
CheckBox funcionality (if i select that checkbox within accordion header child also select )is it possiable to create checkbox component on the accordion header
R.Vijayakumar
Only if you write your own accordion. It's not so hard. Then you will add events listeners for MouseEvent to part of accordion header under CheckBox component - not on main container of accordion header. That will work.
Konrad
A: 

If you did not want to just change the arrow, then you can make an itemRenderer for the Accordion's header, and place it inside Accordion.headerRenderer

http://blog.flexexamples.com/2007/09/24/creating-a-simple-flex-accordion-inline-header-renderer/

Luis B