Have you tried using getUITextFormat and then calling measureText on that?

Patrick

{reduxdj} a écrit :
>
> Flexmasters:
>
> I've tried this a dozen ways, what's the best way to get the width of a
> UITextField and I've brought it up a few times. I won't stop asking
> till somebody can help me then these results then they will be search
> friendly! I know you have better things to do than help me, so it's
> appreciated greatly. I made my own graphical bar chart and
> want the number planted evenly in the middle of my bar and I can't do
> that without the width of my my UITextField. My application looks
> terrible without this aligning in the center. Right now, I have a bunch
> of if statements to try to size my textfields and that's totally 
> dumb...etc.
>
> I've tried:
>
> validateNow( );
> inValidateNow( )
> updateDisplayList( );
> yourGuessIsBetterTh anMine();
>
> I always get back 100
>
> I just need an example -- please- also measureWidth requires anti-alias
> not set to null, how does one set that
> correctly? I wish Adobe would add more examples in the documentation
> about textfields, i mean look at the posts about textfields, wordwrap
> etc. a lot of people have questions about these new tools and not
> everybody migrated from flex 1.5, like me. There's a bunch of stuff
> that should have simple examples. Actually shouldn't every class have
> examples, in a perfect application development world? UITextField has
> no examples. Will there be more actionscript examples in flash
> because i notice that most examples in flex documentation are reserved
> for mxml than AS.
>
>
> I really miss the old days of mytextfield. _width... I'm done venting
> for tonight. ;)
>
> Thanks,
> Patrick
>
>  

Reply via email to