extjs 获取控件

谁知道这个控件在extjs里的xtype 是什么?!
2025-05-13 07:13:53
推荐回答(2个)
回答1:

numberfield

数值用
例程
Ext.create('Ext.form.Panel', {
title: 'On The Wall',
width: 300,
bodyPadding: 10,
renderTo: Ext.getBody(),
items: [{
xtype: 'numberfield',
anchor: '100%',
name: 'bottles',
fieldLabel: 'Bottles of Beer',
value: 99,
maxValue: 99,
minValue: 0
}],
buttons: [{
text: 'Take one down, pass it around',
handler: function() {
this.up('form').down('[name=bottles]').spinDown();
}
}]
});

回答2:

这是扩展的,一般会是textfield.