Character string input format - %nrs

This format takes one character variable and displays it in a single line edit box so that the user can change it. Optionally, it can be modified with an integer n that sets the width of the box in characters. The edit box will then scroll horizontally when necessary. For multiple line edit boxes see %re (%re (Multiline Edit Box)) and %eb (Edit box (%eb)).

For example:

CHARACTER*80 str
str='Initial string padded with spaces if needed'
i=winio@('%10rs',str)

It is important to note that because there is an obvious difference between the widths of characters e.g. 'i' and 'W', the width is specified in 'average characters'.

A grave accent format modifier (`) is used to make the control read-only. In this form no surrounding box is displayed, and the string can only be changed by the program, using WINDOW_UPDATE@ to reflect the changes. This should be used in place of %ws (Display String) when it is necessary to display a string which needs to be updated. A similar effect is produced with %st (String). (see Variable string). The caret is added to provide a call-back function that will be called on every change to the edit window.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited