Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiline textbox in nativescript

How do I get a text area in native script that supports multiline?

I have tried using the text field which does not have the support for multiline.

Have also tried this code to add multiline to the text field:

var myTextfield = this.page.getViewById<TextField>("noteView");

myTextfield.android.setInputType(android.text.InputType.TYPE_TEXT_FLAG_MULTI_LINE);  
like image 777
Lakshaya Maheshwari Avatar asked Mar 25 '17 06:03

Lakshaya Maheshwari


1 Answers

After a bit of research was able to make this text box using the "TextVIew" component of the native script and some of its properties.

Here is the code for the text box: <TextView style="margin-top: 15px" borderColor="#DEDEDE" borderWidth="1" height="100px" hint="Enter Note" returnKeyType="send" class="input input-border"></TextView>

Here is the screen shot of the text view working:

Screen Shot of the textview working

like image 121
Lakshaya Maheshwari Avatar answered Oct 03 '22 11:10

Lakshaya Maheshwari