Config sample in EXTJS
I'm looking for sample code on how to u开发者_如何学编程se config in EXTJS. Can anyone help?
Thanks!
You can use config objects to stereotype repetitive bits in your code.
var configObject = {
xtype : 'label',
width : 50,
text : 'some Text'
}
//create a panel
new Ext.Panel({
id: 'someID',
items: [
configObject,
{
xtype: 'textfield'
},
configObject,
{
xtype: 'radio'<br>
}
]
})
Or:
new Ext.form.Label(configObject);
精彩评论