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
Nikos said
This doesn’t work in flex 3.4
What are Modules? - Flex, ActionScript, Flash Builder, Flex Builder, RIA – Interview questions and answers - FlexInterviews.in said
[...] http://paritoshbisi.wordpress.com/2009/08/30/problem-with-flex-module-percentages-for-height-and-wid… [...]