Next Previous Up Top Contents Index

8.11 DUIM-Gadgets Module

<spin-box>

Open abstract instantiable class

Summary

The class of spin box gadgets.

Superclasses

<collection-gadget>

Init-keywords

borders:
An instance of type one-of(#f, #"none", #"flat", #"sunken", #"raised", #"ridge", #"groove", #"input", #"output"). Default value: #f.

Library

duim-gadgets

Module

duim-gadgets

Description

The class of spin box gadgets. A spin box gadget is a text box that only accepts a limited range of values that form an ordered loop. As well as typing a value directly into the text box, small buttons are placed on its right hand side (usually with up and down arrow icons as labels). You can use these buttons to increase or decrease the value shown in the text box.

Figure 8.35 A spin box

A spin box may be used when setting a percentage value, for example. In this case, only the values between 0 and 100 are valid, and a spin box is a suitable way of ensuring that only valid values are specified by the user.

The borders: init-keyword lets you specify a border around the spin box. If specified, a border of the appropriate type is drawn around the gadget.

When designing a user interface, you will find that sliders are a suitable alternative to spin boxes in many situations.

Operations

None.

Example

contain(make(<spin-box>, 
             items: range(from: 1, to: 10)));

See also

<slider>, page 644


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index