%rs - Edit String

Purpose

To create an single-line edit box and display a character variable (i.e. a string).

Syntax

winio@('%nrs[options]', string)
winio@('%~nrs[options]', string, grey_ctrl)
character(*) string     (input/output)
integer grey_ctrl     (input)

Modifiers

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 %co (Options for Edit)).

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

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

Description

For the equivalent multi-line edit box see %re (Multiline Edit Box).

n is optional and specifies the number of average width characters in the displayed output. The output will scroll horizontally within the specified width if necessary.

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

grey_ctrl is 1 (enabled) or 0 (disable/greyed). If a call-back function is used, it is placed after this control variable.

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 %dd (Spin for Integer) is used before %rs, a spin wheel is added (see %dd (Spin for Integer) 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 following options are available:

PASSWORD

An asterisk (*) appears on the screen for each character typed whilst the string is correctly stored.

UPPERCASE

Alphabetical characters (a . . z) are converted to upper case and displayed and stored as upper case.

LOWERCASE

Alphabetical characters (A . . Z) are converted to lower case and displayed and stored as lower case.

NO_ADDITIONAL_DEPTH

Removes the standard spacing between this control and the next line.

See also

%st (String), %co (Options for Edit), %re (Multiline Edit Box), %eb (Edit Box), %tc (Text Colour), SET_HIGHLIGHTED@, SET_CONTROL_TEXT_COLOUR@


 

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited