Silverfrost Logo About Us | Contact Us
 

%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).

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

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.

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 is used before %rs, a spin wheel is added (see %dd for details).

The subroutine set_highlighted@ can be called to select all of the text in the edit box. It takes one argument which is the handle given by %lc.

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@


 

 

 

Copyright © 1999-2017 Silverfrost Limited