RE: [flexcoders] Percentage based width in ActionScript
percentHeight and percentWidth are for actionscript only No. You can set them in MXML as well. mx:Button width=50%/ is just a convenient alternative (and one familiar from HTML) to mx:Button percentWidth=50/ - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rich Tretola Sent: Thursday, December 28, 2006 11:08 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Percentage based width in ActionScript Actually percentHeight and percentWidth are for actionscript only. IE: this.perrcentWidth = 90; within mxml it would be width=90% Rich On 12/28/06, Matt Maher [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Yikes, I am creating a component in ActionScript and adding an HBOX to it as a child. I want that hbox to fill 90% of the width of this. I see on this page http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/ww help.htm?context=LiveDocs_Partsfile=0518.html http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/w whelp.htm?context=LiveDocs_Partsfile=0518.html a comment about percentHeight, percentWidth In MXML tags only... Come on, really? This seems a very troubling shortcoming. I just know one of you gurus has figured out a simple fix for this, right? -- Rich Tretola mx:EverythingFlex/ http://www.EverythingFlex.com http://www.EverythingFlex.com
RE: [flexcoders] Percentage based width in ActionScript
There's a simple fix... width = this.width * .9 Shan _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Maher Sent: Thursday, December 28, 2006 11:25 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Percentage based width in ActionScript Yikes, I am creating a component in ActionScript and adding an HBOX to it as a child. I want that hbox to fill 90% of the width of this. I see on this page http://livedocs. http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhel p.htm?context=LiveDocs_Partsfile=0518.html macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Partsfile=0518.html a comment about percentHeight, percentWidth In MXML tags only... Come on, really? This seems a very troubling shortcoming. I just know one of you gurus has figured out a simple fix for this, right?
Re: [flexcoders] Percentage based width in ActionScript
percentHeight and percentWidth work in actionscript code... the document you reference says: In ActionScript, you use the height and width properties to specify the dimensions in pixels, and use the percentHeight and percentWidth properties to specify the dimensions as a percentage of the parent container. Brendan On 12/28/06, Matt Maher [EMAIL PROTECTED] wrote: Yikes, I am creating a component in ActionScript and adding an HBOX to it as a child. I want that hbox to fill 90% of the width of this. I see on this page http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=0518.html a comment about percentHeight, percentWidth In MXML tags only... Come on, really? This seems a very troubling shortcoming. I just know one of you gurus has figured out a simple fix for this, right?
Re: [flexcoders] Percentage based width in ActionScript
Actually percentHeight and percentWidth are for actionscript only. IE: this.perrcentWidth = 90; within mxml it would be width=90% Rich On 12/28/06, Matt Maher [EMAIL PROTECTED] wrote: Yikes, I am creating a component in ActionScript and adding an HBOX to it as a child. I want that hbox to fill 90% of the width of this. I see on this page http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=0518.html a comment about percentHeight, percentWidth In MXML tags only... Come on, really? This seems a very troubling shortcoming. I just know one of you gurus has figured out a simple fix for this, right? -- Rich Tretola mx:EverythingFlex/ http://www.EverythingFlex.com