1 Reply Latest reply on Sep 19, 2006 3:35 PM by thunder.scripts

    TextFields & Selection Object

    thunder.scripts
      Well, I have a number of input type text fields and I created a drop down menu using the combobox component to allow the user to change the font of the text.

      To do this, I think I need two things:
      1. The active textfield
      2. The index of the first and the last character of the selection

      The problem is that when I use the combobox, the textfield looses the focus. What I did to solve this is save the field name in a global variable using the onKillFocus event so that I always know which of the fields was selected before selecting the font. But it doesn't seem like an elegant solution, and I have no idea how can I know the begining and ending of the selection (I had little success with the Selection object).

      So, any help will be VERY appreciated
      Thanks in advance!