Page 1 of 1

how can i change the font size for a text area?

Posted: Tue Jul 09, 2013 7:23 pm
by Roger

I am trying to use a TextArea to display a receipt. The TextArea is populated from a RestService and is on a ListItem and would like to do the following.

TextArea must use fixed font such as CourierNew
TextArea must use font size of 8
TextArea must grow to contain entire receipt.


how can i change the font size for a text area?

Posted: Tue Jul 09, 2013 8:58 pm
by Maryna Brodina

Hello!
[quote:]TextArea must use fixed font such as CourierNew
TextArea must use font size of 8[/quote]
you would need to use CSS

[quote:]TextArea must grow to contain entire receipt. [/quote]
try the following code on service Complete event
code$('[name="mobiletextareaName"]').each(function() {$(this).height(this.scrollHeight);})/code
where mobiletextareaName - name of textarea inside the list


how can i change the font size for a text area?

Posted: Wed Jul 10, 2013 11:58 am
by Roger

This works great...Thanks.


how can i change the font size for a text area?

Posted: Sat Jul 13, 2013 6:29 pm
by Roger

Is there a way to have the font increase if the device is changed from portrait to landscape? The Text area is increasing automatically but the font stays the same size.


how can i change the font size for a text area?

Posted: Sun Jul 14, 2013 9:50 pm
by Illya Stepanov

Hi Roger - please can you clarify your question here and we will help you with this topic.


how can i change the font size for a text area?

Posted: Mon Jul 15, 2013 9:02 am
by Maryna Brodina

Hi, please see my reply here https://getsatisfaction.com/apperyio/...


how can i change the font size for a text area?

Posted: Mon Jul 15, 2013 9:15 am
by Maryna Brodina

Hi, you can create class in CSS, for example:
code.biggerfont {
font-size: 30px !important;
}/code
On orientation change event (see https://getsatisfaction.com/apperyio/...) you can add/delete class for textarea
code$('textarea').addClass('biggerfont');/code or code$('textarea').removeClass('biggerfont');/code
Please note that you would need to check device orientation on page Show event to have correct font when page shows.