admin管理员组

文章数量:1287569

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?

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?

Share Improve this question edited Jul 5, 2010 at 17:28 Bella 3,21724 silver badges26 bronze badges asked Jul 5, 2010 at 16:22 VigjVigj 814 silver badges8 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 10

You need to be using:

 Ext.form.TextArea()

Like so:

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

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'
            }]
        }]
    });

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

editor: new Ext.form.TextArea({

})

本文标签: javascriptExtJs multiline inputStack Overflow