8/25/2010 11:09:01 PM
Title:
can I have TextInput on the Accordion Header????????????????
Hello all,
can I have TextInput on the Accordion Header????????????????
In short, I in some scenario, I want default behaviour and in some scenario I want TextInput in the Accordion Header, so that I can edit the name.
Thanks,
8/26/2010 1:55:59 AM
For such kind of functionality you need to use the "CanvasButtonAccordionHeader" provided by flexlib.You can modify this class to extend the functioality. You can download flexlib from this link
http://code.google.com/p/flexlib/
8/26/2010 2:15:55 AM
hi prestine, after importing the flexlib as mention by rex ,u can create a cust component
here is the sample code for it....
<?xml version="1.0" encoding="utf-8"?>
<fl:CanvasButtonAccordionHeader xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:fl='flexlib.containers.accordionClasses.*' width="100%" height="35"
mouseChildren="true" >
<mx:Script>
<![CDATA[
/*********************************override functions *****************************************/
override public function set label(value:String):void {
super.label = "";
}
]]>
</mx:Script>
<mx:HBox width="100%" height="100%" horizontalAlign="center" >
<mx:TextInput text="Text can be changed" width="125"/>
</mx:HBox>
</fl:CanvasButtonAccordionHeader>
8/26/2010 2:18:20 AM
suppose above file CustCompRenderer.mxml, then in the accordion tag u need to mention headerRenderer="CustCompRenderer"