It might be easier to override the TextInput or TextArea and set the autoSize of the UITextField to true, and then having the TextArea determine the height of itself by the height of the UITextField. This UITextField should also throw a resize event so you'll only have to detect when the size changes.
Actually I'm suprised this doesn't already exist as a component. check out http://flexbox.mrinalwadhwa.com/ and see if it's there. Dan Freiman nondocs <http://nondocs.blogspot.com> On 5/3/07, Manish Jethani <[EMAIL PROTECTED]> wrote:
On 5/3/07, qnotemedia <[EMAIL PROTECTED] <qnotemedia%40yahoo.com>> wrote: > I have a collection of vertically placed TextInput and TextArea boxes. > I'm using a "resize" function that manually resizes each of the boxes' > heights depending on the amount of text that is in each, so that > there's never any extra space, and all of the text is always displayed. > > Since these are editable, the problem is when a user is typing in new > text, and they go past the height of the box. I'd like to "stretch" > the box vertically as they are bringing in new lines. Any way to > detect that and re-run the resize function? I suppose I could do it on > change, but that seems a bit extreme doesn't it? Yup. "change" or "textInput" is where I'd do it. You could optimise your resize function so as not to actually resize unless required.