Please enable JavaScript to view this site.

A-Shell Reference

xcall SBXINP, label, opcode, row, col, xmax, entry, inftype, setdef, maxchars, clickcode, tooltip, parentid, exitcode, defpt, timer, cmdflg, maxpt, infldid, labelid, changeflag

SBXINP.SBX is a wrapper for INFLD. Its biggest single advantage over INFLD is that allows you to associate (and align) a label with an INFLD control, rather than having to handle the label and the edit control in separate operations. This routine was originally developed by Firmaware and is now included as part of the standard subroutine collection.

or, as an xfunc$ function:

map1 inp'result

   map2 result'exitcode,s,4

   map2 result'values,s,5000

   map2 result'id,s,4

   map2 result'changed,s,1

 

inp'result = xfunc$("sbxinp",label,opcode,…)

 

Source, samples and related functions can be found in SOSLIB:[907,37].

 

Parameters

label  (String)  [in]

Controls many of the extended capabilities of SBXINP (relative to INFLD). See the subtopic Label for full information.

opcode (Num)  [in]

Determines the operation (edit, display, etc.) according to the following table:

Symbol

Value

Description

SXI_EDT

1

Preload field contents and edit the field. (Ignores label)

SXI_DSP

2

Display only (create the label; create the edit control to display the data but do not put the focus on it).

SXI_DSPEDT

3

Display and edit. Combination of SXI_EDT and SXI_DSP.

SXI_DISABLE

20

Add this to disable the field.

SXI_STATIC

30

Add this to display field as a static text control.

 

row  (Num)  [in]

Row where the field is displayed and edited. (In the case of multi-line fields, this is the top row.)

col  (Num)  [in]

Starting column of the field (not the label).

xmax  (Num)  [in]

Determines the width (in current grid units) of the control used to display and edit the field. (Same as INFLD xmax parameter.) If maxchars not specified, then xmax also determines the maximum number of characters that may be entered into the field.

entry  (Any type)  [in/out]

Field contents. For opcode values except 0, the initial value of entry is preloaded into the field, for display and to establish the initial or default value. On exit, returns the updated field contents. Note that unlike INFLD which requires entry to be a string, SBXINP allows you to pass a numeric data type for fields containing numeric data.

inftype  (String)  [in]

Same as INFLD type parameter, except that unless inftype starts with a "+", whatever you specify will be added to the following default codes: A]134569kWhsg|G|E

If inftype starts with a "+", then there is no default. The "+" is discarded and inftype is used for the INFLD type string.

There are two special cases: "D>" specifies a Date Picker, and "t" specifies a Time Picker.

setdef  (String)  [in]

Same as INFLD setdef parameter, except with the following extensions:

To specify a minimum number of allowed characters, append ">#" to the end of setdef, where # is the number.

Set setdef to "@" to cause the field to be validated (by VALIDA.SBX) for valid email format.

maxchars  (Num)  [in]

Same as INFLD maxchars parameter. If not specified or 0, the maximum number of allowed characters will be equal to the value of the xmax parameter. Setting maxchars larger than xmax allows the field to scroll horizontally (accepting more characters than can be displayed at once). Setting maxchars less than xmax just means that the field will "look" bigger than necessary for the number of allowed characters. Note that the units of xmax are grid units, whereas the units of maxchars are characters. Since characters may requires more or less space than the current grid unit, even when maxchars = xmax, you might have either horizontal scrolling or hit the maxchars limit before filling the display space of the field.

clickcode  (Floating point or Signed Int)  [in]

Specifies the exitcode value to be generated by clicking on this field when the field is not active. Note that this number should be positive even though click exitcodes are generally negative. (Setting clickcode to 400 will cause the field to generate exitcode -400 when clicked.)

tooltip  (String)  [in]

Text of the tooltip to associate with the field.

parentid  (String) or Num) [in]

ID of the parent control (tab, groupbox, dialog). If 0, it is assumed to be the current dialog. If it is a non-empty, non-numeric string, it identifies the parent control by its ID name, rather than its number. Also see infldid parameter (which gets combined with this to create the full INFLD parentid parameter).

exitcode  (Floating point or Signed Int)  [in/out]

Same as INFLD exitcode parameter, except that it has significance on input as well as output. If the incoming exitcode matches clickcode, then the routine assumes that you must have activated the field by clicking on it (which may cause different initial or default field behavior than otherwise.)

Special exitcode values: ??

defpt  (Num)  [in]

Number of display lines for multi-line fields, or the default decimal point position for numeric fields. (Same as INFLD defpt).

timer  (Num)  [in/out]

Same as INFLD timer.

cmdflg  (Num)  [in]

Same as INFLD cmdflg.

maxpt  (Num)  [in]

Same as INFLD maxpt.

infldid  (String or Num)  [in/out]

Optional ID to assign to, or to retrieve from the INFLD control. (This is combined with the parentid parameter above before being passed to INFLD as its parentid parameter.) If the parameter is specified but is empty, or numeric, then it will return the numeric control ID which is auto-assigned to the INFLD control.

labelid  (String or Num)  [in/out]

Optional ID to assign to, or retrieve from, the label control associated with the INFLD control. If a non-empty string name passed, then that is the name that will be assigned to the label control. If an empty string or a numeric parameter is passed, the auto-assigned numeric ID of the control will be returned here.

changeflag  (String)  [out]

Set to "1" if the field contents are changed.