Extjs';s面板';s项目不变
我是Extjs4的学生 首先,请阅读此代码。。这是我小组的项目Extjs';s面板';s项目不变,extjs,extjs4,Extjs,Extjs4,我是Extjs4的学生 首先,请阅读此代码。。这是我小组的项目 var propertyItem = [{ xtype : 'textfield', fieldLabel : 'Name', name : 'objectName', width : 380, margin : '5 0 0 10', value : 'text' }, { xtype : 'textfield'
var propertyItem = [{
xtype : 'textfield',
fieldLabel : 'Name',
name : 'objectName',
width : 380,
margin : '5 0 0 10',
value : 'text'
}, {
xtype : 'textfield',
fieldLabel : 'X',
name : 'objectX',
width : 380,
margin : '5 0 0 10'
}, {
xtype : 'textfield',
fieldLabel : 'Y',
name : 'objectY',
width : 380,
margin : '5 0 0 10'
}, {
xtype : 'textfield',
fieldLabel : 'Width',
name : 'objectWidth',
width : 380,
margin : '5 0 0 10'
}, {
xtype : 'textfield',
fieldLabel : 'Height',
name : 'objectHeight',
width : 380,
margin : '5 0 0 10'
}, {
xtype : 'textfield',
fieldLabel : 'Color',
name : 'objectColor',
width : 380,
margin : '5 0 0 10'
}, {
xtype : 'htmleditor',
fieldLabel : 'Custom',
name : 'objectCustom',
margin : '5 0 0 10',
width : 380,
height : 180
}];
我的小组代码是
var propertyForm = Ext.create('Ext.form.Panel', {
region : 'center',
xtype : 'form',
title : 'Property',
items : propertyItem
});
之后,我改变了这一点,就像这样
propertyItem[0].value = 'This is My Text';
但在浏览器中,这是无法改变的
首先,textfield的值是Test
之后,该文本字段的值为“这是我的文本”
但是,不是改变
我能为这个问题做些什么
对不起,我的傻瓜英语。。谢谢
p、 美国
如果你看不懂这篇文章,请给我留言…试试这个
propertyForm.items.items[0].setValue('This is My Text');
谢谢,嗯!太酷了!!