主要是采用一个插件 FieldLabeler 在ext-3.3.1\examples\ux路径下。
[align=left]var templatePanel = new Ext.Panel({
region: 'north',
height: 40,
width: 600,
bodyStyle: 'padding:8px 0px',
labelWidth: 55,
layout: {
type: 'hbox',
pack: 'center'
},
defaults: {
xtype: 'textfield'
},
items:[{
fieldLabel: '模板名称',
plugins: [Ext.ux.FieldLabeler],
name: 'name'
},{
xtype: 'combo',
width: 150,
ieldLabel: '模板类型',
plugins: [Ext.ux.FieldLabeler],
editable: false,
forceSelection:true,
store: new Ext.data.SimpleStore({
fields: ["value","status"],
data: [["0","直播频道"],["1","虚拟频道"]]
}),
mode: "local",
triggerAction: "all",
displayField : "status",
valueField: "value",
hiddenName : "type",
name: "type",
allowBlank: false
},{
fieldLabel:"备注",
plugins: [Ext.ux.FieldLabeler],
name: "description"
}]
});[/align]
[align=left]var templatePanel = new Ext.Panel({
region: 'north',
height: 40,
width: 600,
bodyStyle: 'padding:8px 0px',
labelWidth: 55,
layout: {
type: 'hbox',
pack: 'center'
},
defaults: {
xtype: 'textfield'
},
items:[{
fieldLabel: '模板名称',
plugins: [Ext.ux.FieldLabeler],
name: 'name'
},{
xtype: 'combo',
width: 150,
ieldLabel: '模板类型',
plugins: [Ext.ux.FieldLabeler],
editable: false,
forceSelection:true,
store: new Ext.data.SimpleStore({
fields: ["value","status"],
data: [["0","直播频道"],["1","虚拟频道"]]
}),
mode: "local",
triggerAction: "all",
displayField : "status",
valueField: "value",
hiddenName : "type",
name: "type",
allowBlank: false
},{
fieldLabel:"备注",
plugins: [Ext.ux.FieldLabeler],
name: "description"
}]
});[/align]