percentHeight and percentWidth.

datagridcolumnVar.percentWidth = 25;

-TH

--- In flexcoders@yahoogroups.com, "Tom Ortega" <[EMAIL PROTECTED]> 
wrote:
>
> What about the opposite?  Does anyone know of a way to set a width 
in
> actionscript to use percentages? i.e.:
> 
> 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 flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,
> > "leo4beer" <leo4beer@> 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
> > >
> >
> >  
> >
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
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/

<*> 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/
 



Reply via email to