Documentation

Reference
qx:spinner (qx.ui.form.Spinner)

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.

LGPL, EPL © 2008 QxTransformer | Siarhei Barysiuk & Christian Boulanger.
Site design and illustrations by Siarhei Barysiuk. | Icons by Dry Icons.

qooxdoo