extjs - ExtJs5 中文本字段的可编辑区域

标签 extjs textfield extjs5

文本字段在 ExtJs 5 中不起作用。这是我的定义:

       {
            fieldLabel: 'First Name',
            name: 'firstName',
            width : 200,
            allowBlank: false
        }

标签位于可编辑区域的顶部,并且可编辑区域比总宽度小得多。它在 Ext 4 中运行良好。

最佳答案

将标签放置在 Ext.form.field.Text 内您可以使用labelAlign组件属性,您可以使用 labelWidth 设置组件内标签的宽度属性(property)也来自 Ext.form.Labelable混合。

Ext.create('Ext.form.field.Text', {
    fieldLabel: 'First Name',
    padding: 10,
    name: 'firstName',
    allowBlank: false,

    width : 400, //width of component
    labelAlign: 'right', //position of label
    labelWidth: 200, // width of label

    renderTo: Ext.getBody()
});

这里是fiddle

关于extjs - ExtJs5 中文本字段的可编辑区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27263704/

相关文章:

javascript - 是否可以在 Extjs4 中访问跨站点 POST 方法

Flutter - TextField 的动态后缀文本?

javascript - 使用 Ext.form.field.HtmlEditor 右键单击​​上下文菜单

extjs5 - 树存储 : different behaviour beetween autoLoad configuration and load() function

javascript - 服务器端未收到 Extjs 5.0 模型 POST 值(工作 Extjs 4.2)

sorting - ExtJs 网格中可排序为 false 后列标题显示箭头图标

regex - 如何限制 ExtJS DatePicker 中的两个日期?

javascript - Titanium textField 存储为整数

php - 隐藏文本字段时间运行

c# - 如何使用动态 id 查找 ExtJS 元素