Hi Alex,
Thanks for the reply. I tried your suggestion, but it doesn't seem to
be working. Am I doing it correctly? Code is:
...
...
public class Text extends mx.controls.Text
{
public function text(){
super();
}
override protected function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void {
super.updateDisplayList(unscaledWidth, unscaledHeight);
textField.width += 10;
}
}
I've tried adding integers from 2 to 20, but still does not seem to
have any effect.
Any help is appreciated. Thanks in advance.
Thanks!
Renz
--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Subclass Text and widen the TextField.
>
>
>
> ________________________________
>
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of renzeullo
> Sent: Thursday, April 10, 2008 4:08 AM
> To: [email protected]
> Subject: [flexcoders] Embedded Fonts and Text Alignment problem in Text
> control
>
>
>
> Hi all,
>
> Im having a problem with right, center, and justify alignment in a
> text control using embedded fonts. The last character in the line is
> not shown in full if it touches the right border of the control.
>
> I have an html-formatted text which I feed into Text.htmlText. The
> html-formatted text is taken from a RichTextEditor control. I
> substiture the font names inside the html <font> tags with the aliases
> I assign to the embedded fonts. But when it renders in the Text
> control, the character that touches the right border gets cut in half.
>
> This happens with variable sized fonts like Arial. Fixed sized fonts
> like Courier New gets generated without problems.
>
> Anybody know of any solution?
>
> Thanks in advance.
>
> Renz
>