How to Control the Cursor (Clarid) in TextInput in Flex 4.5

I need to process directed graphs and then convert them to the correct unicode representation. For example, when the user types:

< pre>Sx

My application needs to be replaced with:

Ŝ

Now, I have been able to replace it without problems. But the problem is that once I have completed the replacement, the cursor goes to the beginning of the text box instead of the end. Because I’m trying to dynamically update the user’s text, this obviously doesn’t work.

How can I get It so that after I replace the text in the TextInput box, the cursor is on the right instead of the left?

found a solution.

All you have to do is Don’t update the entire text, erase the current content, and use:

textInput.appendText()

Hope this will help others:)

I need to process directed graphs and then convert them to the correct unicode representation. For example, when the user types:

< pre>Sx

My application needs to be replaced with:

Ŝ

Now, I have been able to replace it without problems. But the problem is that once I have completed the replacement, the cursor goes to the beginning of the text box instead of the end. Because I’m trying to dynamically update the user’s text, this obviously doesn’t work.

How can I get It so that after I replace the text in the TextInput box, the cursor is on the right instead of the left?

Found the solution.

All you have to do is not to update the entire text, erase the current content, and then use :

textInput.appendText()

Hope this will help others:)

Leave a Comment

Your email address will not be published.