1 Reply Latest reply on Dec 12, 2008 4:34 AM by apu2

    how to move caret programmatically

      I am creating a Bengali editor using a Bengali font. A key input or a sequence of key inputs translates to a single Bengali character symbol or a basic character symbol with a modifier symbol. I am using an event handler for the change event in TextArea object. In the event handler, I check the key typed , map it to the unicode(s) corresponding to the key or sequence of keys typed and put this unicode sequence back to TextArea.text .
      The problem is that when , say the sequence "ko" is typed the two letters translate to 3 Bengali symbols. When I replace the "ko" with the 3 symbols, they show up alright but the caret or cursor shows up between symbol 2 and 3. For all other symbols, it works properly i.e. that caret shows up after the last symbol. So, in order to type, user has to manually press right arrow to move the caret to the right of 3rd symbol. Can it be done programmatically? What I want is I will map "ko" to 4 rather than 3 symbols, the last being a non-printable unicode for right arrow. Is it possible? I could not find the unicode for non-printable right arrow. I just want to move caret one position to the right programmatically.