<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Collapsible Panel Component for Flex</title>
	<atom:link href="http://hasseg.org/blog/post/113/collapsible-panel-component-for-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://hasseg.org/blog/post/113/collapsible-panel-component-for-flex/</link>
	<description></description>
	<lastBuildDate>Sun, 29 Jan 2012 23:57:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jarno</title>
		<link>http://hasseg.org/blog/post/113/collapsible-panel-component-for-flex/comment-page-1/#comment-5657</link>
		<dc:creator>Jarno</dc:creator>
		<pubDate>Thu, 09 Sep 2010 05:57:40 +0000</pubDate>
		<guid isPermaLink="false">http://hasseg.org/blog/?p=113#comment-5657</guid>
		<description>Hi! Thank you for this component. I have a canvas inside this panel because of absolute layout for my components. I have dynamic size text component inside panel. This Collapsible panel does not size itself compared text component. I only see first line of text component.

In other word this panel does not know how to set it&#039;s height compared childElements.</description>
		<content:encoded><![CDATA[<p><span class='eg-image' style='float:left; margin-right:10px; display:block; width:40px' ><img alt='' src='http://0.gravatar.com/avatar/66cf9cf417ee6acfd970d1e33993656c?s=40&amp;d=http%3A%2F%2Fhasseg.org%2Fblank-avatar.png%3Fs%3D40&amp;r=G' class='avatar avatar-40 photo' height='40' width='40' /></span>Hi! Thank you for this component. I have a canvas inside this panel because of absolute layout for my components. I have dynamic size text component inside panel. This Collapsible panel does not size itself compared text component. I only see first line of text component.</p>
<p>In other word this panel does not know how to set it&#8217;s height compared childElements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Batkins</title>
		<link>http://hasseg.org/blog/post/113/collapsible-panel-component-for-flex/comment-page-1/#comment-5067</link>
		<dc:creator>Batkins</dc:creator>
		<pubDate>Tue, 06 Jul 2010 22:41:27 +0000</pubDate>
		<guid isPermaLink="false">http://hasseg.org/blog/?p=113#comment-5067</guid>
		<description>Advise the following changes for anyone looking to use this panel in order to get it to function and resize back to original proportions properly:

[cc lang=&quot;actionscript&quot;]
package com.containers {
   
    import flash.events.*;
    
    import mx.containers.Panel;
    import mx.core.ScrollPolicy;
    import mx.effects.AnimateProperty;
    import mx.events.*;
   
   
    /**
    * The icon designating a &quot;closed&quot; state
    */
    [Style(name=&quot;closedIcon&quot;, property=&quot;closedIcon&quot;, type=&quot;Object&quot;)]
   
    /**
    * The icon designating an &quot;open&quot; state
    */
    [Style(name=&quot;openIcon&quot;, property=&quot;openIcon&quot;, type=&quot;Object&quot;)]
   
    /**
    * This is a Panel that can be collapsed and expanded by clicking on the header.
    *
    * @author Ali Rantakari
    */
    public class CollapsiblePanel extends Panel {
       
        private var _creationComplete:Boolean = false;
        private var _open:Boolean = true;
        private var _openAnim:AnimateProperty;
        //used for resizing
        private var _defaultHeight:int;
        private var _usesPercentHeight:Boolean;
       
        /**
        * Constructor
        *
        */
        public function CollapsiblePanel(aOpen:Boolean = true):void
        {
            super();
            this.open = aOpen;
            this.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
            this.addEventListener(ResizeEvent.RESIZE, onResizeEvent);
        }
       
       
        // BEGIN: event handlers                ------------------------------------------------------------
       
        private function creationCompleteHandler(event:FlexEvent):void
        {
            this.horizontalScrollPolicy = ScrollPolicy.OFF;
            this.verticalScrollPolicy = ScrollPolicy.OFF;
                       
            _creationComplete = true;
           
            _openAnim = new AnimateProperty(this);
            _openAnim.duration = 300;
           
            titleBar.addEventListener(MouseEvent.CLICK, headerClickHandler);
        }
       
        private function headerClickHandler(event:MouseEvent):void { toggleOpen(); }
        
        private function onResizeEvent(event:ResizeEvent):void
        {
        	if (_open &amp;&amp; !_usesPercentHeight) this._defaultHeight = this.height;
        }
       
        private function callUpdateOpenOnCreationComplete(event:FlexEvent):void { updateOpen(); }
       
        // --end--: event handlers          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       
       
       
        // BEGIN: private methods               ------------------------------------------------------------
       
        // sets the height of the component without animation, based
        // on the _open variable
        private function updateOpen():void
        {
            if (!_open) height = closedHeight;
            //else height = openHeight; - unnecessary, it will automatically be sized
            setTitleIcon();
        }
       
        // the height that the component should be when open
        private function get openHeight():Number {
            //return measuredHeight;
            return _defaultHeight;
        }
       
        // the height that the component should be when closed
        private function get closedHeight():Number {
            var hh:Number = getStyle(&quot;headerHeight&quot;);
            if (hh &lt;= 0 &#124;&#124; isNaN(hh)) hh = titleBar.height;
            return hh;
        }
       
        // sets the correct title icon
        private function setTitleIcon():void
        {
            if (!_open) this.titleIcon = getStyle(&quot;closedIcon&quot;);
            else this.titleIcon = getStyle(&quot;openIcon&quot;);
        }
       
        // --end--: private methods         - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       
       
       
       
       
       
       
       
        // BEGIN: public methods                ------------------------------------------------------------
        
        /**
		* Collapses / expands this block (with animation)
		*	this verison of the method contains a fix for the height not changing effectively
		*/
		public function toggleOpen():void
		{
		    if (_creationComplete &amp;&amp; !_openAnim.isPlaying) 
		    {
		        _openAnim.fromValue = _openAnim.target.height;
		        _openAnim.toValue = _open ? _openAnim.target.closedHeight : openHeight;
		        if (_usesPercentHeight) _openAnim.property = _open ? &quot;height&quot; : &quot;percentHeight&quot;;
		        else _openAnim.property = &quot;height&quot;;
		        _open = !_open;
		        _openAnim.addEventListener(EffectEvent.EFFECT_END, function onEffectEnd():void {
		            // Geert (8-Apr-2009)
		            // Only adapt the status &amp; title + send the event when the animation has done playing:
		            setTitleIcon();
		            dispatchEvent(new Event( _open ? Event.OPEN : Event.CLOSE ));
		            _openAnim.removeEventListener(EffectEvent.EFFECT_END, onEffectEnd);
		        });
		        _openAnim.play();
		    }
		}
       
       
        /**
        * Whether the block is in a expanded (open) state or not
        */
        public function get open():Boolean {
            return _open;
        }
        /**
        * @private
        */
        public function set open(aValue:Boolean):void {
            _open = aValue;
            if (_creationComplete) updateOpen();
            else this.addEventListener(FlexEvent.CREATION_COMPLETE, callUpdateOpenOnCreationComplete, false, 0, true);
        }
        
		override public function set percentHeight(value:Number):void
		{
			if (_open)
			{
				super.percentHeight = value;
				if (!isNaN(value))
				{
					this._defaultHeight = value;
					this._usesPercentHeight = true;
				}
				else
					this._usesPercentHeight = false;
			}
		}
       
        // --end--: public methods          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       
       
    }
}
[/cc]</description>
		<content:encoded><![CDATA[<p><span class='eg-image' style='float:left; margin-right:10px; display:block; width:40px' ><a rel='external nofollow' href='http://www.batkins.net'><img alt='' src='http://1.gravatar.com/avatar/722dddc209bc1175b01fddff56e2156c?s=40&amp;d=http%3A%2F%2Fhasseg.org%2Fblank-avatar.png%3Fs%3D40&amp;r=G' class='avatar avatar-40 photo' height='40' width='40' /></a></span>Advise the following changes for anyone looking to use this panel in order to get it to function and resize back to original proportions properly:</p>
<div class="codecolorer-container actionscript mac-classic codecolorer-customstyle" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package com.<span style="color: #006600;">containers</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #66cc66;">*</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">containers</span>.<span style="color: #006600;">Panel</span>;<br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">core</span>.<span style="color: #006600;">ScrollPolicy</span>;<br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">effects</span>.<span style="color: #006600;">AnimateProperty</span>;<br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">events</span>.<span style="color: #66cc66;">*</span>;<br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/**<br />
&nbsp; &nbsp; * The icon designating a &quot;closed&quot; state<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#91;</span>Style<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;closedIcon&quot;</span>, property=<span style="color: #ff0000;">&quot;closedIcon&quot;</span>, <span style="color: #0066CC;">type</span>=<span style="color: #ff0000;">&quot;Object&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/**<br />
&nbsp; &nbsp; * The icon designating an &quot;open&quot; state<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#91;</span>Style<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;openIcon&quot;</span>, property=<span style="color: #ff0000;">&quot;openIcon&quot;</span>, <span style="color: #0066CC;">type</span>=<span style="color: #ff0000;">&quot;Object&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/**<br />
&nbsp; &nbsp; * This is a Panel that can be collapsed and expanded by clicking on the header.<br />
&nbsp; &nbsp; *<br />
&nbsp; &nbsp; * @author Ali Rantakari<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CollapsiblePanel <span style="color: #0066CC;">extends</span> Panel <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _creationComplete:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _open:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">true</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _openAnim:AnimateProperty;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//used for resizing</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _defaultHeight:<span style="color: #0066CC;">int</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _usesPercentHeight:<span style="color: #0066CC;">Boolean</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp; &nbsp; * Constructor<br />
&nbsp; &nbsp; &nbsp; &nbsp; *<br />
&nbsp; &nbsp; &nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> CollapsiblePanel<span style="color: #66cc66;">&#40;</span>aOpen:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">open</span> = aOpen;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FlexEvent.<span style="color: #006600;">CREATION_COMPLETE</span>, creationCompleteHandler<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>ResizeEvent.<span style="color: #006600;">RESIZE</span>, onResizeEvent<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// BEGIN: event handlers &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;------------------------------------------------------------</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> creationCompleteHandler<span style="color: #66cc66;">&#40;</span>event:FlexEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">horizontalScrollPolicy</span> = ScrollPolicy.<span style="color: #006600;">OFF</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">verticalScrollPolicy</span> = ScrollPolicy.<span style="color: #006600;">OFF</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _creationComplete = <span style="color: #000000; font-weight: bold;">true</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _openAnim = <span style="color: #000000; font-weight: bold;">new</span> AnimateProperty<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _openAnim.<span style="color: #0066CC;">duration</span> = <span style="color: #cc66cc;">300</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; titleBar.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, headerClickHandler<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> headerClickHandler<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span> toggleOpen<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onResizeEvent<span style="color: #66cc66;">&#40;</span>event:ResizeEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_open <span style="color: #66cc66;">&amp;</span>amp;<span style="color: #66cc66;">&amp;</span>amp; <span style="color: #66cc66;">!</span>_usesPercentHeight<span style="color: #66cc66;">&#41;</span> <span style="color: #0066CC;">this</span>._defaultHeight = <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">height</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> callUpdateOpenOnCreationComplete<span style="color: #66cc66;">&#40;</span>event:FlexEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span> updateOpen<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// --end--: event handlers &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// BEGIN: private methods &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ------------------------------------------------------------</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// sets the height of the component without animation, based</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// on the _open variable</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> updateOpen<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span>_open<span style="color: #66cc66;">&#41;</span> <span style="color: #0066CC;">height</span> = closedHeight;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//else height = openHeight; - unnecessary, it will automatically be sized</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setTitleIcon<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// the height that the component should be when open</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> openHeight<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//return measuredHeight;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _defaultHeight;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// the height that the component should be when closed</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> closedHeight<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> hh:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">getStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;headerHeight&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>hh <span style="color: #66cc66;">&amp;</span>lt;= <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">||</span> <span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>hh<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> hh = titleBar.<span style="color: #0066CC;">height</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> hh;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// sets the correct title icon</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> setTitleIcon<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span>_open<span style="color: #66cc66;">&#41;</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">titleIcon</span> = <span style="color: #0066CC;">getStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&amp;</span>quot;closedIcon<span style="color: #66cc66;">&amp;</span>quot;<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">titleIcon</span> = <span style="color: #0066CC;">getStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&amp;</span>quot;openIcon<span style="color: #66cc66;">&amp;</span>quot;<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// --end--: private methods &nbsp; &nbsp; &nbsp; &nbsp; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// BEGIN: public methods &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;------------------------------------------------------------</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp; &nbsp; * Collapses / expands this block (with animation)<br />
&nbsp; &nbsp; &nbsp; &nbsp; * &nbsp; this verison of the method contains a fix for the height not changing effectively<br />
&nbsp; &nbsp; &nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> toggleOpen<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_creationComplete <span style="color: #66cc66;">&amp;</span>amp;<span style="color: #66cc66;">&amp;</span>amp; <span style="color: #66cc66;">!</span>_openAnim.<span style="color: #006600;">isPlaying</span><span style="color: #66cc66;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _openAnim.<span style="color: #006600;">fromValue</span> = _openAnim.<span style="color: #0066CC;">target</span>.<span style="color: #0066CC;">height</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _openAnim.<span style="color: #006600;">toValue</span> = _open ? _openAnim.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">closedHeight</span> : openHeight;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_usesPercentHeight<span style="color: #66cc66;">&#41;</span> _openAnim.<span style="color: #006600;">property</span> = _open ? <span style="color: #66cc66;">&amp;</span>quot;height<span style="color: #66cc66;">&amp;</span>quot; : <span style="color: #66cc66;">&amp;</span>quot;percentHeight<span style="color: #66cc66;">&amp;</span>quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span> _openAnim.<span style="color: #006600;">property</span> = <span style="color: #66cc66;">&amp;</span>quot;height<span style="color: #66cc66;">&amp;</span>quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _open = <span style="color: #66cc66;">!</span>_open;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _openAnim.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>EffectEvent.<span style="color: #006600;">EFFECT_END</span>, <span style="color: #000000; font-weight: bold;">function</span> onEffectEnd<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Geert (8-Apr-2009)</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Only adapt the status &amp;amp; title + send the event when the animation has done playing:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setTitleIcon<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dispatchEvent<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Event<span style="color: #66cc66;">&#40;</span> _open ? Event.<span style="color: #006600;">OPEN</span> : Event.<span style="color: #0066CC;">CLOSE</span> <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _openAnim.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>EffectEvent.<span style="color: #006600;">EFFECT_END</span>, onEffectEnd<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _openAnim.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp; &nbsp; * Whether the block is in a expanded (open) state or not<br />
&nbsp; &nbsp; &nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> open<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _open;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp; &nbsp; * @private<br />
&nbsp; &nbsp; &nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> open<span style="color: #66cc66;">&#40;</span>aValue:<span style="color: #0066CC;">Boolean</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _open = aValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_creationComplete<span style="color: #66cc66;">&#41;</span> updateOpen<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FlexEvent.<span style="color: #006600;">CREATION_COMPLETE</span>, callUpdateOpenOnCreationComplete, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; override <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> percentHeight<span style="color: #66cc66;">&#40;</span>value:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_open<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">super</span>.<span style="color: #006600;">percentHeight</span> = value;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span><span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>value<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>._defaultHeight = value;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>._usesPercentHeight = <span style="color: #000000; font-weight: bold;">true</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>._usesPercentHeight = <span style="color: #000000; font-weight: bold;">false</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// --end--: public methods &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: SuriForFlex</title>
		<link>http://hasseg.org/blog/post/113/collapsible-panel-component-for-flex/comment-page-1/#comment-5037</link>
		<dc:creator>SuriForFlex</dc:creator>
		<pubDate>Mon, 28 Jun 2010 21:37:26 +0000</pubDate>
		<guid isPermaLink="false">http://hasseg.org/blog/?p=113#comment-5037</guid>
		<description>Hi Ali,

Great component!!

I was wondering if we could increase the width of panel when it opens. This width is greater than the width of CollapsiblePanel.

I would really appreciate your help

Thanks</description>
		<content:encoded><![CDATA[<p><span class='eg-image' style='float:left; margin-right:10px; display:block; width:40px' ><img alt='' src='http://0.gravatar.com/avatar/ac86a4847114348fb91aa0405eab6ab8?s=40&amp;d=http%3A%2F%2Fhasseg.org%2Fblank-avatar.png%3Fs%3D40&amp;r=G' class='avatar avatar-40 photo' height='40' width='40' /></span>Hi Ali,</p>
<p>Great component!!</p>
<p>I was wondering if we could increase the width of panel when it opens. This width is greater than the width of CollapsiblePanel.</p>
<p>I would really appreciate your help</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Cheung</title>
		<link>http://hasseg.org/blog/post/113/collapsible-panel-component-for-flex/comment-page-1/#comment-2072</link>
		<dc:creator>Alan Cheung</dc:creator>
		<pubDate>Tue, 02 Feb 2010 03:47:08 +0000</pubDate>
		<guid isPermaLink="false">http://hasseg.org/blog/?p=113#comment-2072</guid>
		<description>Love this component. Thanks!</description>
		<content:encoded><![CDATA[<p><span class='eg-image' style='float:left; margin-right:10px; display:block; width:40px' ><img alt='' src='http://0.gravatar.com/avatar/226a591fec30da0afe70477f367bf453?s=40&amp;d=http%3A%2F%2Fhasseg.org%2Fblank-avatar.png%3Fs%3D40&amp;r=G' class='avatar avatar-40 photo' height='40' width='40' /></span>Love this component. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Few best Custom Components for Adobe Flex &#8211; Part 1? - WittySparks</title>
		<link>http://hasseg.org/blog/post/113/collapsible-panel-component-for-flex/comment-page-1/#comment-2050</link>
		<dc:creator>Few best Custom Components for Adobe Flex &#8211; Part 1? - WittySparks</dc:creator>
		<pubDate>Sat, 05 Dec 2009 20:02:54 +0000</pubDate>
		<guid isPermaLink="false">http://hasseg.org/blog/?p=113#comment-2050</guid>
		<description>[...] Normal Custom Collapsible Panel Normal Custom Collapsible Panel [...]</description>
		<content:encoded><![CDATA[<p>[...] Normal Custom Collapsible Panel Normal Custom Collapsible Panel [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geert</title>
		<link>http://hasseg.org/blog/post/113/collapsible-panel-component-for-flex/comment-page-1/#comment-2042</link>
		<dc:creator>Geert</dc:creator>
		<pubDate>Tue, 24 Nov 2009 09:24:51 +0000</pubDate>
		<guid isPermaLink="false">http://hasseg.org/blog/?p=113#comment-2042</guid>
		<description>@kumar
The class CollapsiblePanel extends Panel
and titleBar is a (protected) property of Panel.

You should certainly have a look at the Flex documentation @ http://livedocs.adobe.com/flex/3/langref/index.html</description>
		<content:encoded><![CDATA[<p><span class='eg-image' style='float:left; margin-right:10px; display:block; width:40px' ><img alt='' src='http://0.gravatar.com/avatar/ab51cb59c3ac989823b17f68991938c2?s=40&amp;d=http%3A%2F%2Fhasseg.org%2Fblank-avatar.png%3Fs%3D40&amp;r=G' class='avatar avatar-40 photo' height='40' width='40' /></span>@kumar<br />
The class CollapsiblePanel extends Panel<br />
and titleBar is a (protected) property of Panel.</p>
<p>You should certainly have a look at the Flex documentation @ <a href="http://livedocs.adobe.com/flex/3/langref/index.html" rel="nofollow">http://livedocs.adobe.com/flex/3/langref/index.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kumar</title>
		<link>http://hasseg.org/blog/post/113/collapsible-panel-component-for-flex/comment-page-1/#comment-2041</link>
		<dc:creator>kumar</dc:creator>
		<pubDate>Tue, 24 Nov 2009 08:59:53 +0000</pubDate>
		<guid isPermaLink="false">http://hasseg.org/blog/?p=113#comment-2041</guid>
		<description>Hi,

In provided .as file, the attaribute name titileBar is not defined.

Could you please explaine me what it is and where it needs to be defined.

Thanks,
Kumar</description>
		<content:encoded><![CDATA[<p><span class='eg-image' style='float:left; margin-right:10px; display:block; width:40px' ><img alt='' src='http://0.gravatar.com/avatar/c61f01e4384cc322255cab57ea2afa12?s=40&amp;d=http%3A%2F%2Fhasseg.org%2Fblank-avatar.png%3Fs%3D40&amp;r=G' class='avatar avatar-40 photo' height='40' width='40' /></span>Hi,</p>
<p>In provided .as file, the attaribute name titileBar is not defined.</p>
<p>Could you please explaine me what it is and where it needs to be defined.</p>
<p>Thanks,<br />
Kumar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kumar</title>
		<link>http://hasseg.org/blog/post/113/collapsible-panel-component-for-flex/comment-page-1/#comment-2018</link>
		<dc:creator>kumar</dc:creator>
		<pubDate>Tue, 17 Nov 2009 13:33:57 +0000</pubDate>
		<guid isPermaLink="false">http://hasseg.org/blog/?p=113#comment-2018</guid>
		<description>Hi,

When iam using this iam getting Classes must not be nested.

Please help me.

Thanks,
Praveen</description>
		<content:encoded><![CDATA[<p><span class='eg-image' style='float:left; margin-right:10px; display:block; width:40px' ><img alt='' src='http://0.gravatar.com/avatar/c61f01e4384cc322255cab57ea2afa12?s=40&amp;d=http%3A%2F%2Fhasseg.org%2Fblank-avatar.png%3Fs%3D40&amp;r=G' class='avatar avatar-40 photo' height='40' width='40' /></span>Hi,</p>
<p>When iam using this iam getting Classes must not be nested.</p>
<p>Please help me.</p>
<p>Thanks,<br />
Praveen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sekhar</title>
		<link>http://hasseg.org/blog/post/113/collapsible-panel-component-for-flex/comment-page-1/#comment-1978</link>
		<dc:creator>Sekhar</dc:creator>
		<pubDate>Thu, 01 Oct 2009 19:15:06 +0000</pubDate>
		<guid isPermaLink="false">http://hasseg.org/blog/?p=113#comment-1978</guid>
		<description>Excellent work.  You saved my day.

Thanks</description>
		<content:encoded><![CDATA[<p><span class='eg-image' style='float:left; margin-right:10px; display:block; width:40px' ><img alt='' src='http://0.gravatar.com/avatar/65984f552bbb4aeea019ab7965d0926d?s=40&amp;d=http%3A%2F%2Fhasseg.org%2Fblank-avatar.png%3Fs%3D40&amp;r=G' class='avatar avatar-40 photo' height='40' width='40' /></span>Excellent work.  You saved my day.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Viral B</title>
		<link>http://hasseg.org/blog/post/113/collapsible-panel-component-for-flex/comment-page-1/#comment-1977</link>
		<dc:creator>Viral B</dc:creator>
		<pubDate>Wed, 30 Sep 2009 01:17:45 +0000</pubDate>
		<guid isPermaLink="false">http://hasseg.org/blog/?p=113#comment-1977</guid>
		<description>&quot;The ColapsablePanel does not auto resize when the child size changes&quot;.

In order to fix this:

1. Comment out overridden invalidateSize() method.
2. Fix updateOpen method. UpdateOpen is called when you assign value to open attribute. Let updateOpen method assign only closed height. No need to worry about open height.

private function updateOpen():void
{
   if (!_open) height = closedHeight;
// else height = openHeight;
   setTitleIcon();
}</description>
		<content:encoded><![CDATA[<p><span class='eg-image' style='float:left; margin-right:10px; display:block; width:40px' ><img alt='' src='http://0.gravatar.com/avatar/88a4bb028682a36959e14d538fe8575c?s=40&amp;d=http%3A%2F%2Fhasseg.org%2Fblank-avatar.png%3Fs%3D40&amp;r=G' class='avatar avatar-40 photo' height='40' width='40' /></span>&#8220;The ColapsablePanel does not auto resize when the child size changes&#8221;.</p>
<p>In order to fix this:</p>
<p>1. Comment out overridden invalidateSize() method.<br />
2. Fix updateOpen method. UpdateOpen is called when you assign value to open attribute. Let updateOpen method assign only closed height. No need to worry about open height.</p>
<p>private function updateOpen():void<br />
{<br />
   if (!_open) height = closedHeight;<br />
// else height = openHeight;<br />
   setTitleIcon();<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

