Flex - Custom Component - Percentage Width/Height

Posted by Hamish on Stack Overflow See other posts from Stack Overflow or by Hamish
Published on 2010-03-18T20:17:39Z Indexed on 2010/03/18 20:21 UTC
Read the original article Hit count: 541

I am trying to create a Custom Flex Component using the Flex Component framework:

http://www.adobe.com/livedocs/flex/3/html/help.html?content=ascomponents_advanced_3.html.

All good components allow you to define their dimensions using percentage values using:

MXML:

TextInput width="100%"

or

Actionscript at runtime:

textinp.percentWidth = 100;

My question is how do you implement percentage width/height in the measure() method of your custom component? More specifically, these percentages are converted to pixels values at some stage, how is this done?

© Stack Overflow or respective owner

Related posts about flex3

Related posts about actionscript3