%dd - Spin for Integer

Purpose

To insert a spin wheel for an integer edit box (%rd (Edit Integer)) or a string edit box (%rs (Edit String)).

Syntax

winio@('%dd', step)
integer step     (input)

Description

%dd can be used with %rd (Edit Integer) in order to provide an attached spin wheel.

step is the size of the increase/decrease. The resulting %rd (Edit Integer) value will be a multiple of step. Any call-back function should be attached to %rd (Edit Integer). %dd is placed before the %rd (Edit Integer) to which it refers.

%dd can also be used with %rs (Edit String). In this case it should have a non-zero step value (which is ignored). The subsequent %rs (Edit String) box should have a call-back function which uses CLEARWIN_STRING@('CALLBACK_REASON') to identify the reasons 'SPIN_UP' and 'SPIN_DOWN'. The call-back function must provide the response to the spin (for example, by cycling through the days of the week).

The value of the step can be changed dynamically by using the function SET_INCREMENT@. This function returns the old value for the increment or zero on failure.

SUBROUTINE SET_INCREMENT@( HWND, STEP )
INTEGER(7) HWND
DOUBLE PRECISION STEP

hwnd is the Windows handle of the controls obtained using %lc (Handle of Last Control).

Example

winio@('%dd', 1L)

See also

%rd (Edit Integer), %il (Integer Limit), %rs (Edit String), %df (Spin for Float)

 

 

 

Basket
Empty
 
Copyright © 1999-2021 Silverfrost Limited