Dandy Ling Kwong
Posts: 0
Joined: Sat Jan 10, 2015 9:06 am

How to stretch text area to fit screen?

I have an app with a text area component. How do I make the text area to stretch to fit the screen?

Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How to stretch text area to fit screen?

Hi Dandy,

As i can see on your screen shot - you have stretched to screen with textarea component.

So please specify more details.

Regards.

Dandy Ling Kwong
Posts: 0
Joined: Sat Jan 10, 2015 9:06 am

How to stretch text area to fit screen?

Hi Yurii,

I mean stretch the text area vertically to fit the screen, such that the entire space will be occupied

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

How to stretch text area to fit screen?

Hello Dandy,

You can stretch the text area in the editor (just drag the right lower corner of it). Or you may use some plugin if you like:
https://getsatisfaction.com/apperyio/...

Dandy Ling Kwong
Posts: 0
Joined: Sat Jan 10, 2015 9:06 am

How to stretch text area to fit screen?

Hi,

Stretching the text area in the editor does not make any changes to the final product (in test page and in mobile browser). It turns back to auto-resize.

Is there any way to stretch the text area vertically to fill up the vertical space in the screen?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How to stretch text area to fit screen?

Hi Dandy,

Unfortunatly you can not do it with drag-n-drop functionality or such easy way.

But you can try following:

  1. Add "page show" event handler.

  2. Populate it with following JS code.

    pre

    //here you should set certain value to fit your case.
    var ocupiedHeight = 400;

    var windowHeight = jQuery(window).height();

    var freeHeight = windowHeight - ocupiedHeight;

    Apperyio("textAreaName").height(freeHeight);

    /pre

    Regards.

Dandy Ling Kwong
Posts: 0
Joined: Sat Jan 10, 2015 9:06 am

How to stretch text area to fit screen?

Hi all,

I tried the above mentioned method. The text area got resized on pageshow event, but it immediately shrink to autoresize again.

This also happens on when I put the code in load event.

It seems like that there are some property that will set the textbox to autoresize after the load and pageshow event.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How to stretch text area to fit screen?

Hi Dandy,

Please try following code:

pre

var onDelay = function(){
//here you should set certain value to fit your case.
var ocupiedHeight = 400;
var windowHeight = jQuery(window).height();
var freeHeight = windowHeight - ocupiedHeight;
Apperyio("mobiletextarea_96").height(freeHeight);

};

window.setTimeout(onDelay, 100);

/pre

Regards.

Return to “Issues”