Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    AutoFitTextAreaItem and max height

    I'd like to have AutoFitTextAreaItem vertical size only grow upto a predefined limit. If there is more data then I want scroll bars to appear.

    Is something like this possible?

    I couldn't see a maxsize property, and setheight doesn't do the job.
    Thx

    #2
    Hi any suggestions?

    Hi any suggestions?

    Comment


      #3
      Hi Isomorphic,

      I have the same question. How come when the max height is reached the scroll bars do not appear? Is there a way to force the scroll bars to appear under this use case?

      Thank you

      Comment


        #4
        To do this reliably would require a bunch of deep cross-browser work - this is an area of pretty bad browser inconsistency, and worse, lying to us about the actual height of the element, which makes auto-sizing far more difficult.

        Simplest approach would be to stick the entire form, including the textArea, into a scrollable area.

        Second simplest would be to create a sub-form just for the TextAreaItem, have that be scrollable, and connect it with the main form via a ValuesManager. Alternatively, this could be done without a ValuesManager by implementing the sub-form as a CanvasItem.

        Finally, you could use Feature Sponsorship. Note that we are now doing sponsorships in a style where we provide a patch to allow you to use the new APIs with an older version, so you don't have to wait for a new release, and your application code is forward-compatible (the patch just auto-disables itself when you update to a new version). Very convenient!

        Comment


          #5
          Thank you for the update and clarification.

          Comment

          Working...
          X