FYI, the documentation doesn’t say anything about it, but the percentWidth
and percentHeight
properties don’t work on UITextField
instances in Flex 2. Here’s the spartan implementation of the percentWidth property:
/** * @copy mx.core.UIComponent#percentWidth */ public function get percentWidth():Number { return NaN; } /** * @private */ public function set percentWidth(value:Number):void { }
The documentation states that these properties may be set to values from 0 to 100. I’ve submitted a bug report, but I thought I’d send out a warning.
I guess it’s time for a little subclassing. I’ve been having a lot of frustration with text-based components in Flex. Labels can only be a single line. UITextField seems to be the best bet for multiline text because the Text component is a horrible pain in the rear that doesn’t seem to like word-wrapping. Flex team developers, if you’re listening, I want better text-based components!
tried TextArea for multiline?
I suppose turning off all the skinned parts and making it non-editable would work. That seems a little strange, though.
Yeah I have stumbled across many things such as this. Having the framework source there is invaluable for bug fixing. Unfortunately they swallow errors such as this instead of rasing some sort of debug level error. Oh well.
FYI, the documentation error has been acknowledged by Adobe’s QA department, and it will be fixed.
has this bug been fixed in any of the hot fixes?!!!!!!!!!!!!
this is a horrible bug, TextAera doesn’t work to my needs.
this bug pretty much destroys any nice text resizing/scaling.
what a horrible bug. so horrible. man. i like flash so much better, but i have to use flex for work. flex 3 is almost public, maybe it will have less bugs.
Jesse, I just checked. The documentation has been updated for the
percentWidth
andpercentHeight
properties of UITextField in Flex 3. It now says, “This property is always set to NaN for the UITextField control.” There’s no indication that the behavior has changed.