1 Reply Latest reply on Feb 5, 2010 11:18 AM by Flex harUI

    setting cursor position inside the editable combo box

    sreedharkv

      I have an editable combo box, to enter the account number. After the user enters the first three characters, "-" is appended to it by code.  But the cursor is still before "-". I have to bring the cursor after "-", so that user can enter the remaining digits of the account number.

       

      Example:

      • User enters "345" in the editable combo box
      • "-" is appended it to by the code, so that the value in the combo box is "345-"
      • The cursor position is at after "345", whereas it is expected after "345-"

       

      Problem:

      Since the "-" is added by the code, the cursor is still after 345|_, whereas as, I want the cursor to be available after 345-|

      This is very annoying, the user has to do one more click after "-" to bring the cursor after "-", to enter the remaining digits of the account.

       

      Note:

      In the above "|" denotes the cursor position.

       

      Please let me know, how I can change the cursor position (move it by a character) programmatically in flex, so that it appears as expected.