开发者

ExtJs multiline input

开发者 https://www.devze.com 2023-01-05 23:24 出处:网络
How do i create a multiline input with vertical scrollbars in EXTJS? I used this noteField = new Ext.form.TextField({

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

I used this

 noteField = new Ext.form.TextField({
    开发者_JAVA百科            emptyText: 'note...',
                multiline: true,
                applyTo: 'txtNote',
                maxLength: 250
            });

            noteField.setSize(200, 100);

but the input is not multiline...

Someone can help me?


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({

})
0

精彩评论

暂无评论...
验证码 换一张
取 消