1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    40
    Answers
    2
    Vote Rating
    1
    bvkimball is on a distinguished road

      0  

    Default Answered: How do i get a TextAreaField to AutoSize?

    Answered: How do i get a TextAreaField to AutoSize?


    I need my TextAreaFields to resize the height based on the content. Everything i do is not very consistent, should it do this by default? I have a fair amount of css and code trying to fix this that i fear i might have broken it.

    Is there a good/easy way to get this to work on the phone?

  2. Ok, So i put the following in my updateValue function:
    Code:
    component.input.setHeight(component.input.dom.scrollHeight);
    This works for my purpose which is loading data and building a form. I might need to add it to an onkeydown listener when i am doing editing.

    I hope this helps others.

  3. #2
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Answers
    93
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Unfortunately there is no easy way to do this, and it is not done by the frame work. You would need to listen to the keyup event and calculate the size of the text (ewh) and then resize it from that.

    Yup, it sucks.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  4. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    40
    Answers
    2
    Vote Rating
    1
    bvkimball is on a distinguished road

      0  

    Default


    Ok, So i put the following in my updateValue function:
    Code:
    component.input.setHeight(component.input.dom.scrollHeight);
    This works for my purpose which is loading data and building a form. I might need to add it to an onkeydown listener when i am doing editing.

    I hope this helps others.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi