datagridcolumnVar.width = 25%;
won't work.
On 6/23/06,
Angela <[EMAIL PROTECTED]> wrote:
I am actually having the same problem -
I have a canvas with the width set to 100%. If I try and get the
width in pixels through AS it returns 0.
If I try the same thing through mxml it works fine.
So this in AS:
public function getMiddle():Number {
var x:Number;
x = mainCanvas.width*.5;
return x;
}
--returns 0
in MXML:
<mx:Label text="{mainCanvas.width*.5}"/>
--returns the amount in pixels.
Anyone out there know how to get the pixel value though AS?
Angela.
--- In [email protected], "leo4beer" <[EMAIL PROTECTED]> wrote:
>
> Accepting MXML attribute's width in percentage in a custom component
>
> Hi, I have a component I've created by inheriting UIObject class
>
> In my mxml I have the following lines used for initiating my
component:
>
> <my:comp width="400"….
>
> In my AS code I can trace the value of __width, in this case the
> result will be "400".
>
> My problem is that when I set the value as percentage:
>
> <my:comp width="100%"….
>
> In this case the value of __width is "undefined"
>
> What should I do in order to get the correct value when setting the
> width in percentage and not in pixels??
>
> Thanks
>
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
- [flexcoders] Re: Accepting MXML attribute's width in... Angela
- [flexcoders] Re: Accepting MXML attribute's wid... Tim Hoff
- Re: [flexcoders] Re: Accepting MXML attribu... Luís Gustavo Sanabio
- Re: [flexcoders] Re: Accepting MXML attribute's... Tom Ortega
Reply via email to

