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 [email protected], "Daniel Freiman" <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 > > Search Archives: 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/

