删除textareafield边框

时间:2015-09-28 13:52:43

标签: javascript extjs

我如何围绕文本的textareafield边界。

Ext.create('Ext.form.FormPanel', {
    title      : 'Sample TextArea',
    width      : 400,
border     : false,
    bodyPadding: 10,
    renderTo   : Ext.getBody(),
    items: [{
        xtype     : 'textareafield',
        grow      : true,
        name      : 'message',
        fieldLabel: 'Message',
        anchor    : '100%'
    }]
});

2 个答案:

答案 0 :(得分:0)

假设,例如,您正在使用ExtJs 5.1,并且您希望从输入字段中删除边框(更多信息将有助于缩小变量),您可以为组件定义cls然后定义输入字段的边界为"无",

{
    xtype     : 'textareafield',
    grow      : true,
    name      : 'message',
    fieldLabel: 'Message',
    cls       : 'xpto',
    anchor    : '100%',
}

你的css将是

.xpto .x-form-trigger-wrap-default {border: none;}

检查docs总是有帮助的,但可以提供示例和见解。

答案 1 :(得分:0)

要在表单上显示数据并能够使用if (!$("#form").valid() || !($(this).is('#Create') confirmAction('CreateRecord')) || !($(this).is('#Save') confirmAction('SaveRecord')) || !($(this).is('#Send') confirmAction('SendRecord'))) { e.preventDefault(); return; } 以及表单面板的其他好处,您可以使用displayfield

form.loadRecord()
相关问题