Documentation
- qx:row
- qx:label
- qx:application
- qx:splitButton
- qx:toolBarSplitButton
- qx:tabView
- qx:resizer
- qx:comboBox
- qx:textarea
- qx:list
- qx:slider
- qx:checkGroupBox
- qx:contextMenu
- qx:embedHtml
- qx:embedCanvas
- qx:checkBox
- qx:spacer
- qx:toolBarMenuButton
- qx:menuCheckBox
- qx:widget
- qx:toggleButton
- qx:composite
- qx:command
- qx:page
- qx:radioButton
- qx:toolBarPart
- qx:hsplit
- qx:vsplit
- qx:toolTip
- qx:atom
- qx:toolBarRadioButton
- qx:dateChooser
- qx:treeFolder
- qx:groupBox
- qxt:elsif
- qx:selectBox
- qx:listItem
- qxt:else
- qx:menu
- qxt:component
- qxt:property
- qx:toolBar
- qxt:script
- qx:separator
- qx:textField
- qx:embedIframe
- qxt:if
- qx:menuRadioButton
- qx:popup
- qx:slideBar
- qxt:variant
- qx:grow
- qx:tree
- qx:toolBarCheckBox
- qx:treeFile
- qx:vbox
- qx:scroll
- qx:colorSelector
- qx:split
- qx:canvas
- qx:dateField
- qx:spinner
- qxt:subscriber
- qx:menuBarButton
- qx:toolBarButton
- qx:image
- qx:button
- qx:column
- qx:basic
- qx:colorPopup
- qx:repeatButton
- qx:menuBar
- qx:hbox
- qx:grid
- qx:dock
- qx:formMenuButton
- qx:menuButton
- qxt:listener
- qx:stack
- qx:window
- qx:radioGroupBox
- qx:radioGroup
A spinner is a control that allows you to adjust a numerical value, typically within an allowed range. An obvious example would be to specify the month of a year as a number in the range 1 – 12.
To do so, a spinner encompasses a field to display the current value (a textfield) and controls such as up and down buttons to change that value. The current value can also be changed by editing the display field directly, or using mouse wheel and cursor keys.
An optional qx.ui.form.Spinner#numberFormat property allows you to control the format of how a value can be entered and will be displayed.
A brief, but non-trivial example:
var s = new qx.ui.form.Spinner();
s.set({
max: 3000,
min: -3000
});
var nf = new qx.util.format.NumberFormat();
nf.setMaximumFractionDigits(2);
s.setNumberFormat(nf);
A spinner instance without any further properties specified in the constructor or a subsequent set command will appear with default values and behaviour.
- name
-
The name of the widget. Mainly used for serialization proposes.
Default value: Possible values: - numberFormat
-
Controls the display of the number in the textfield
Default value: Possible values: - min
-
minimal value of the Range object
Default value: 0 Possible values: - max
-
maximal value of the Range object
Default value: 100 Possible values: - allowShrinkY
-
None
Default value: false Possible values:
- pageStep
-
The amount to increment on each pageup/pagedown keypress
Default value: 10 Possible values: - editable
-
Controls whether the textfield of the spinner is editable or not
Default value: true Possible values: - value
-
The value of the spinner.
Default value: 0 Possible values: - singleStep
-
The amount to increment on each event (keypress or mousedown)
Default value: 1 Possible values: - focusable
-
None
Default value: true Possible values:
- wrap
-
whether the value should wrap around
Default value: false Possible values: - appearance
-
None
Default value: "spinner" Possible values:
{ u'add': { u'*': u'add/defaultWithPosition.mako',
u'layout': u'add/noParent.mako',
u'qx:application': u'add/qx/application.mako',
u'qx:split': u'add/qx/split.mako',
u'qxt:variant': u'add/noParent.mako'},
u'attributes': {u'*': u'attr/default.mako', u'id': u'', u'qxt:*': u''},
u'body': { u'*': u'body/qx/widget.mako',
u'qxt:component': u'body/qxt/component_root.mako'},
u'data': { u'attr': {},
u'props': { u'class': u'qx.ui.form.Spinner',
u'constructor-args': u'min,value,max'}},
u'extends': [u'qx:spinner', u'qx:widget', u'base']}
LGPL, EPL © 2008 QxTransformer | Siarhei Barysiuk &
Christian Boulanger.
Site design and illustrations by Siarhei Barysiuk. | Icons by Dry Icons.