$ScrSize: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
(Automatically generated page update)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<span class="pageSubtitle">Change size of field on SCREEN</span>
<span class="pageSubtitle">Change size of field on SCREEN</span>
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ScrHide function is '''[[to be entered]]'''.</p>
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the screen $functions are the [[Screen classes#Screens and ScreenFields|Screen and ScreenField classes]].</p>
   
   
This [[Calling Sirius Mods $functions|callable]] function changes the size of a field on a SCREEN.
This [[Calling Sirius Mods $functions|callable]] function changes the size of a field on a <var>SCREEN</var>.
   
   
==Syntax==
==Syntax==
<p class="syntax">[%result =] $ScrSize(field_name, size)
<p class="syntax">[<span class="term">%result</span> =] $ScrSize(<span class="term">field_name</span>, <span class="term">size</span>)
</p>
</p>


Line 11: Line 11:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%result</th>
<tr><th>%result</th>
<td>This numeric value indicates the function result. See [[#Status codes|"Status codes"]].</td></tr>
<td>This numeric value indicates the function result. See [[#Status codes|Status codes]].</td></tr>


<tr><th>field_name</th>
<tr><th>field_name</th>
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>


Line 47: Line 47:
<li><var class="product">Sirius Functions</var>
<li><var class="product">Sirius Functions</var>
</ul>
</ul>
[[Category:$Functions|$ScrSize]]

Latest revision as of 22:52, 20 September 2018

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