<mx:Flexing> A Paritosh Bisi’s Blog

On Rich Internet Applications, Adobe Flex, ActionScript, Web Technologies and more…

Archive for August, 2009

Problem with Flex ‘Module’ – Percentages for height and width

Posted by Paritosh Bisi on August 30, 2009

Recently while working with Flex Modules I came across an interesting find. Whenever I was setting the module’s height and width to “100%”, it was simply ignoring. So after googling a lot I came across the following tech note from adobe.

http://www.adobe.com/support/documentation/en/flex/2/releasenotes_flex201_sdk.html

Here it is clearly noted that, “Module ignores percentages for width/height, always sizing to content”. And the work around for this is to add percentWidth="100" percentHeight="100" instead of height=”100%” width=”100%”.

Example:

<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" percentWidth="100" percentHeight="100">

So, while developing modules, whenever we need to set height and width to 100 percentages, we need to carefully implement like above.

Happy Flexing :-)

Posted in Flex Builder | Leave a Comment »