$ScrSize: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Created page with " Change size of field on SCREEN== This callable function changes the size of a field on a SCREEN. The <var>$ScrSize</var> function accepts t...")
 
mNo edit summary
Line 1: Line 1:
<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>
   
   
Change size of field on SCREEN==
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 SCREEN.
   
   
The <var>$ScrSize</var> function accepts two arguments and returns a numeric code
==Syntax==
indicating its success.
<p class="syntax">[%result =] $ScrSize(field_name, size)
</p>
 
===Syntax terms===
<table class="syntaxTable">
<tr><th>%result</th>
<td>This numeric value indicates the function result. See [[#Status codes|"Status codes"]].</td></tr>
 
<tr><th>field_name</th>
<td>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 (<tt>%</tt>). <code>INPUT:FIELD4</code> is an example of a valid field name.</td></tr>
   
   
The first argument is the name of the field whose size is to be changed.
<tr><th>size</th>
The field name must be specified as a string that contains the screen name,
<td>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. </td></tr>
a colon, and the field name.
</table>
The screen name should not have a '%' at the
 
start.  <code>INPUT:FIELD4</code> is an example of a valid field name.
===Status codes===
<p class="code">0 &mdash; No errors
The second argument is the new size of the field.
1 &mdash; Field does not exist or invalid field name
The field size can be
2 &mdash; Invalid size (less than 1 or greater than screen size)
decreased or it can be increased up to the point where it would overlap
3 &mdash; Would overlap other field
another field or run off the end of a screen.
</p>
It is always possible to
 
extend a field into the "TAG" field (columns 79-80) and it is possible to
==Usage notes==
<ul>
<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>
==Examples==
<ol>
<li>This code fragment sets the size of input field <code>FIELD1</code> on screen <code>INPUT</code> to 30:                                                     
<p class="code">%rc = $scrsize('INPUT:FIELD1', 30)                   
</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>.
</ol>
==Products authorizing $ScrSize==
<ul class="smallAndTightList">
<li><var class="product">Sirius Functions</var>
</ul>

Revision as of 22:23, 19 November 2012

Change size of field on SCREEN

Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ScrHide function is to be entered.

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