$ScrSize: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (minor formatting)
m (add link)
Line 31: Line 31:
<ul>
<ul>
<li>It is always possible to extend a field into the "TAG" field (columns 79-80), and it is possible to
<li>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 <var>$ScrWide</var> function.
extend it up to column 132 if the screen had been prepared with a <var>[[$ScrWide]]</var> function.
</ul>
</ul>


Line 40: Line 40:
</p>                                                                   
</p>                                                                   
                                                                        
                                                                        
<li>See the <var>$ScrHide</var> [[$ScrHide#Examples|Examples]] section for a complete example using <var>$ScrHide</var>, <var>$ScrSize</var>, and <var>$ScrWide</var>.
<li>See the <var>[[$ScrHide]]</var> [[$ScrHide#Examples|Examples]] section for a complete example using <var>$ScrHide</var>, <var>$ScrSize</var>, and <var>$ScrWide</var>.
</ol>
</ol>



Revision as of 21:30, 4 January 2016

Change size of field on SCREEN

Note: Most Sirius $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