Vigj
Vigj

Reputation: 81

ExtJs multiline input

How do i create a multiline input with vertical scrollbars in EXTJS?

I used this

 noteField = new Ext.form.TextField({
                emptyText: 'note...',
                multiline: true,
                applyTo: 'txtNote',
                maxLength: 250
            });

            noteField.setSize(200, 100);

but the input is not multiline...

Someone can help me?

Upvotes: 1

Views: 8662

Answers (3)

Guru Singh
Guru Singh

Reputation: 62

try the below

Ext.create('Ext.form.Panel', {
        fullscreen: true,
        items: [{
            xtype: 'fieldset',
            title: 'About you',
            items: [{
                xtype: 'textfield',
                label: 'Name',
                name: 'name'
            }, {
                xtype: 'textareafield',
                label: 'Bio',
                maxRows: 4,
                name: 'bio'
            }]
        }]
    });

Upvotes: 1

Amar Birajdar
Amar Birajdar

Reputation: 16

Use TextArea instead of TextField. I have also faced the same issue. This code snippet works for me:

editor: new Ext.form.TextArea({

})

Upvotes: 0

Bella
Bella

Reputation: 3217

You need to be using:

 Ext.form.TextArea()

Like so:

 var noteField = new Ext.form.TextArea({
      //config here    
 });

Upvotes: 10

Related Questions