Thanks, but it won’t help. If I type
in “23” my handler adds a dot to it and the text becomes “23.”
Your code sets the “23”
selected and caret is there (not after the added dot as it should be), the
thing is that it should show 23. and caret after that, and no selection. -Mika From: var
fm = getFocusManager(); Philippe
Maegerman From: Mika, Have you looked at: Selection.setSelection(stringLength,stringLength) HTH, Allen From: Hi, I'm trying to set the caret to the end of the textfield. I
have a keyUp event handler that adds the dot "." automatically for
the text entered. The problem is that when the dot is added by actionscript the
caret stays behind the added dot while typing, so the dot gets misplaced and the
typing comes out wrong. How can I position the caret AFTER the autoinserted
dot? I've tried to fool around with the Selection class functions but none of
it seems to help.. Here is an example of the handler I'd like to use: function onKeyUp( event )
{
if( MyTextField.text.length == 2 )
{
MyTextField.text = MyTextField.text + ".";
// HOW TO POSITION THE CARET HERE SO THAT IT COMES OUT LIKE THIS ON TEXTFIELD:
"myenteredtext.CARET_BLINKING_HERE???
}
} -Mika ------------------------------------------------------------------ This e-mail and any attached files are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Any views or opinions presented are solely those of author and do not necessarily represent those the Emakina Company. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its associated attachments is strictly prohibited. We also inform you that we have checked that this message does not contain any virus but we decline any responsability in case of any damage caused by an a non detected virus. |
- RE: [flexcoders] Caret positioning problem Mika Kiljunen
- RE: [flexcoders] Caret positioning problem Philippe Maegerman
- RE: [flexcoders] Caret positioning problem Mika Kiljunen
- RE: [flexcoders] Caret positioning problem Philippe Maegerman
- Re: [flexcoders] Caret positioning problem Niklas Richardson
- Re: [flexcoders] Caret positioning problem Niklas Richardson
- RE: [flexcoders] Caret positioning pro... Mika Kiljunen
- RE: [flexcoders] Caret positioning problem Mika Kiljunen
- RE: [flexcoders] Caret positioning problem Philippe Maegerman