ClassPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

up-down-control

Class

The class of the up-down control. That is a control with two arrow heads pointing in opposite directions used for incrementing a numeric value in either direction by clicking on the arrow heads. A range of valid values can be specified by the range property.

Can be used on its own or paired with a buddy. A possible buddy-widget is the editable-text control. Once paired, the up-down-control will modify the display of its buddy-widget, otherwise it only modifies its own value (which can be programmatically accessed and, if desired, displayed elsewhere).

For example, place an editable-text control on a form and place an up-down control next it. Make the value of the editable-text 1 and the range of the up-down control (0, 100). Ensure that the editable-text is correctly identified as the buddy-widget of the up-down control (as indicated by the buddy-widget property). When you run the form, the value in the editable text widget will increase (up to 100) and decrease (down to 0) as the up-down control is clicked.

There is special increment behavior for an up-down-control. You can have the increment be a single value or a list of paired values. In the latter case, the first member of each pair indicates a number of seconds and the second indicates the value of the increment during those seconds. For example, a value of ((1 1)(1 3)(2 10)(4 100)) indicates that the up-down-control should increment (or decrement) by 1 for the first second, by 3 for the next second, by 10 for the next 2 seconds, and then by 100 thereafter until either the mouse button is released or the maximum or minimum value of the control's range is reached.

See About how to get sample code for creating controls in cgide.htm, which explains how to use the IDE to create such code.

A diagram of window and widget classes is shown in Widget and window classes in cgide.htm.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version