|
Don't ask me how I found it, I tried all kind of things
like setInterval, doLater etc ...
MyTextField.text =
MyTextField.text + ".";
MyTextField.redraw(); var fm = getFocusManager(); fm.setFocus(MyTextField); Selection.setSelection(0,MyTextField.text.length) Enjoy++
Philippe
Maegerman
Web developer
+32 2 400 40
39
+32 472 35 28
10
Avoir des rêves,
c'est continuer d'exister...
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mika Kiljunen Sent: mercredi 10 août 2005 15:27 To: [email protected] Subject: RE: [flexcoders] Caret positioning problem You wish
but no,
does not work (already tried it) L -Mika From:
MyTextField.text.length+1
maybe ;) Philippe
Maegerman From:
Thanks, but it wont
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. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- 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 problem Mika Kiljunen
- RE: [flexcoders] Caret positioning problem Mika Kiljunen
- RE: [flexcoders] Caret positioning problem Philippe Maegerman

