1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
| Ext.define('KitchenSink.view.form.Number', {
| extend: 'Ext.form.Panel',
|
| requires: [
| 'Ext.form.field.Number'
| ],
| xtype: 'form-number',
|
| //<example>
| exampleTitle: 'Number Field',
| exampleDescription: '<p>This example shows how to use the number field.</p>',
| //</example>
|
| title: 'Number fields with spinner',
| bodyPadding: 5,
| frame: true,
| width: 340,
| defaultType: 'numberfield',
|
| initComponent: function(){
| Ext.apply(this, {
| fieldDefaults: {
| labelWidth: 110,
| anchor: '100%'
| },
| items: [{
| fieldLabel: 'Default',
| name: 'basic',
| value: 1,
| minValue: 1,
| maxValue: 125
| },{
| fieldLabel: 'With a step of 0.4',
| name: 'test',
| minValue: -100,
| maxValue: 100,
| allowDecimals: true,
| decimalPrecision: 1,
| step: 0.4
| },{
| hideTrigger: true,
| fieldLabel: 'Without spinner',
| name: 'without_spinner'
| }]
| });
| this.callParent();
| }
| });
|
|