Results 1 to 3 of 3

Thread: Autosize TextField depending on contents?

  1. #1
    Sencha User
    Join Date
    Jul 2009
    Posts
    38

    Default Autosize TextField depending on contents?

    Is it possible to make a TextField autosize itself depending on the length of the text inside it?

    I can think of a long winded way where I set up a listener for the change event of the field which counts the number of characters in the field and sets the width accordingly. The config autoWidth sounds like it should do what I am wanting to do, but regardless of what is put in the field, it will stay the same width.

    Does autoWidth only work on a refresh of the field? At the moment, my fields are in a FormPanel which is rendered on page load, but collapsed in the south region of my viewport until required, at which point it is expanded and the fields are populated.

  2. #2
    Ext User Lukman's Avatar
    Join Date
    Jun 2009
    Location
    Malaysia
    Posts
    138

    Default

    grow: true

  3. #3
    Sencha User
    Join Date
    Jul 2009
    Posts
    38

    Default

    Thanks, that works

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •