1 Reply Latest reply on Oct 3, 2006 6:57 AM by inlineblue

    Resize TextArea height based on content?

    digitalentropy
      Hello,

      I have a textarea that I am filling with content from a dataservice. The textarea is in a panel that does not have defined dimensions. I would like the textarea to expand as needed so that it does not display scrollbars. Right now the TA just defaults to a very small size! Is there an attribute I need to set to get this behavior?

      Thank you!
        • 1. Re: Resize TextArea height based on content?
          inlineblue Level 1
          Note that this is not a scaleable solution. You have to limit the vertical height of the TextArea (your screen is not infinite), so scrollbars will have to be used at some point. The simplest solution is to simply give the TA a fixed height and let it scroll itself when needed. Or you can have it grow with the Panel by setting the TA's height to 100% (or use top and bottom constraints).