Gtk.SpinButton.new_with_range

function new_with_range(min:Number, max:Number, step:Number):Gtk.Widget {
    // Gjs wrapper for gtk_spin_button_new_with_range()
}

This is a convenience constructor that allows creation of a numeric Gtk.SpinButton without manually creating an adjustment. The value is initially set to the minimum value and a page increment of 10 * step is the default. The precision of the spin button is equivalent to the precision of step.

Note that the way in which the precision is derived works best if step is a power of ten. If the resulting precision is not suitable for your needs, use Gtk.SpinButton.prototype.set_digits to correct it.

min

Minimum allowable value

max

Maximum allowable value

step

Increment added or subtracted by spinning the widget

Returns

The new spin button as a Gtk.Widget