Gordan, the code you provided has one small issue, since originalHeight is set everytime minimize is called it resets the minimum each time.
Is there a way to set the minimum size on creationComplete or another function inside the custom panel? So for instance: protected override function createChildren(): void { super.createChildren(); originalHeight = this.height; trace(originalHeight); } I tried the following, but it didn't work. When the trace is called it returns "0" so I assume "this" in createChildren isn't refering to the my custom Panel or is it something else? This might be another subject, but can you do this parent.this.height? --- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote: > > 'this' is always the component or application represented by the top tag > in the file. > > > > - Gordon > > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of jnewport > Sent: Monday, November 06, 2006 1:18 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: custom Panels original size > > > > That is it thank you. I didn't know you could use "this" in your > script tag. I wasn't sure it would know what "this" referred to. > > Thank, J > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > , "Daniel Freiman" <FreimanCQ@> wrote: > > > > I'm a little confused at what you are doing. Posting code would > probably > > help. But if I understand what you're trying to do correctly, you can > > probably add the following code to the panel. It should create save > the > > hight before minimizing and then restore it later. You just need to > call > > the two functions when you want to restore/minimize the panel. > > > > - Dan > > > > <mx:Script> > > <![CDATA[ > > > > public var originalHeight:Number; > > > > public function minimize(event:Event):void { > > originalHeight = this.height; > > height = getStyle("headerHeight"); > > } > > > > public function restore(event:Event):void { > > height = originalHeight; > > } > > ]]> > > </mx:Script> > > > > On 11/6/06, jnewport <jason_newport@> wrote: > > > > > > I was wondering if any has come across this problem or solution. I > > > have create a custom component that is resizable. I am able to make > > > the panel smaller, but when I want it to restore back to the > original > > > size it end ups 500+ pixels long. > > > > > > To make it smaller I am using minimize="getStyle('headerHeight')" > > > but my restore function doesn't work. Is there a way to capture the > > > original size of the panel on creationComplete? I tried restoring > the > > > height to the Panels child Vbox component, but it didn't work > either. > > > > > > Any help or a tutorial would be greatly appreciated. > > > > > > Thanks, J > > > > > > > > > > > > > > > -- > > > Flexcoders Mailing List > > > FAQ: > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> > > > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > <http://www.mail-archive.com/flexcoders%40yahoogroups.com> > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > -- 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 <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/