$ScrSize

From m204wiki
Jump to navigation Jump to search

Change size of field on SCREEN

Note: Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the screen $functions are the Screen and ScreenField classes.

This callable function changes the size of a field on a SCREEN.

Syntax

[%result =] $ScrSize(field_name, size)

Syntax terms

%result This numeric value indicates the function result. See Status codes.
field_name The name of the field whose size is to be changed. The field name must be specified as a string that contains the screen name, a colon, and the field name. The screen name should not begin with a percent sign (%). INPUT:FIELD4 is an example of a valid field name.
size The new size of the field. The field size can be decreased or it can be increased up to the point where it would overlap another field or run off the end of a screen.

Status codes

0 — No errors 1 — Field does not exist or invalid field name 2 — Invalid size (less than 1 or greater than screen size) 3 — Would overlap other field

Usage notes

  • It is always possible to extend a field into the "TAG" field (columns 79-80), and it is possible to extend it up to column 132 if the screen had been prepared with a $ScrWide function.

Examples

  1. This code fragment sets the size of input field FIELD1 on screen INPUT to 30:

    %rc = $scrsize('INPUT:FIELD1', 30)

  2. See the $ScrHide Examples section for a complete example using $ScrHide, $ScrSize, and $ScrWide.

Products authorizing $ScrSize

  • Sirius Functions