%rf - Edit Floating Point


To create an edit box and display a floating point value that can be updated.


winio@('%nrf[option]', value)
winio@('%~nrf[option]', value, grey_ctrl)
double precision value     (input/output)
integer grey_ctrl     (input)


Grave accent (`) - makes the control read-only (no box is supplied, see %co - Options for Edit).

Caret (^) - the call-back is called when a change is made (see also %co).

Question mark (?) - a help string is supplied.

Tilde (~) - adds a variable that controls the grey (enable/disable) state.


n is optional and specifies the number of average width characters in the displayed output. Only values in range can be entered (see %co - Options for Edit). The range can be set using %fl - Float Limit. Values are entered in decimal or exponent form.

If %`rf is specified, then the value presented can only be changed by the program using window_update@(value).

grey_ctrl is 1 (enabled) or 0 (disable/greyed). A call-back function (if present) is placed after this control variable.

option can be set to the keyword initially_blank in order to create an edit box that is initially empty (see notes below).

The standard call-back functions 'COPY', 'CUT', and 'PASTE' can be used in this context by attaching them to menu items and/or accelerator keys.

When %df - Spin for Float is used before %rf, a spin wheel is added (see %df - Spin for Float for details).

The subroutine SET_HIGHLIGHTED@ can be called to select all of the text in the edit box. It takes one INTEGER(7) argument which is the handle given by %lc - Handle of Last Control.


The [intially_blank] option can be reset dynamically using a call to the routine:


W is the handle for the control obtained using %lc - Handle of Last Control. The routine is used to selectively switch off this property at runtime.

%rf accepts the input of a comma. This is transcribed to a decimal point.

See also

%fl - Float Limit, %df - Spin for Float, %co - Options for Edit, %tc - Text Colour, SET_HIGHLIGHTED@, SET_CONTROL_TEXT_COLOUR@




Copyright © 1999-2020 Silverfrost Limited