2 Replies Latest reply on Jan 30, 2008 6:53 AM by bshirley

    TextInput resize

      I would like to resize the TextInput while the user is editing it.
      I think pure subclassing in ActionScript is most desirable.
      If so, which methods should be fiddled with?

      Is there an external way to mock it up?
      listening to the key event,
      asking the textinput to measure the text,
      then what... (can't figure out how to force the resize)
        • 1. Re: TextInput resize
          ntsiii Level 3
          You'll probably need measuredHeight. What happens if you just set height=measuredHeight in a change handler.

          Haven't done this, just thinking.

          • 2. Re: TextInput resize
            bshirley Level 1
            the measuredWidth didn't work,
            but this is doins something:

            var metric:TextLineMetrics = lastUpdate.measureText(lastUpdate.text + event.keyCode);
            lastUpdate.width = metric.width + 14; // fudge factor likely some sum of border/pad/etc.

            I'm trying to keep the text fully visible, but it still sometimes scrolls to the left when there's plenty of space to the right. (more fiddling in order)