Guys, thanks for the answers.

I'm looking at overriding the methods.

Best Regards,
Aldo


On 6/13/05, Manish Jethani <[EMAIL PROTECTED]> wrote:
> On 6/11/05, Aldo Bucchi <[EMAIL PROTECTED]> wrote:
> 
> > Is there a way to rotate a component without bypassing the v2 architecture?
> > The problem with rotating an object is that it can result in changing
> > it's box dimensions, which would create layout problems if no
> > notifications are triggered...
> 
> Even if you trigger notifications, the "preferred size" (which is what
> determines the amound of space it takes) for the object is calculated
> only on the basis of the preferred sizes of its children -- not taking
> the rotation into account.  If you want the parent container to size
> itself correcrtly, you'll have to override the child's
> getPreferredWidth() and getPreferredHeight()
> 
> <?xml version="1.0"?>
> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"; xmlns="*">
>   <mx:Button click="innerBox._rotation = 45;" />
>   <mx:Box id="outerBox" backgroundColor="blue" marginLeft="5" marginRight="5">
>   <mx:Box id="innerBox" backgroundColor="red" marginLeft="5" marginRight="5">
>     <mx:TextInput />
>   </mx:Box>
>   </mx:Box>
> </mx:Application>
> 
> Here the preferred width and height of 'innerBox' remains the same,
> even after rotating.  You can override it to return new values after
> taking _rotation into account.
> 
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 


-- 
::::: Aldo Bucchi :::::
mobile (56) 8 429 8300


 
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