Please enable JavaScript to view this site.

A-Shell Consolidated Reference

May be used to separate the display width of the field from the maximum number of characters that can be entered. Normally the objective here is to allow a longer string to be input than screen real estate would otherwise allow. This is accomplished by scrolling the field horizontally within the display width defined by xmax. A secondary motivation presents itself in the GUI proportional font environment, where you might want to make xmax larger than maxchrs in order to allow for the possibility that all the characters entered are wider than average, and thus would not fit within the display box size based on xmax.

For example, a two-character state field is likely to have this problem. The field display width is calculated based on the fixed pitch font size times the xmax value. In most cases, this is more than wide enough for proportional fonts, which "on average" are more compact than fixed pitch fonts of the same point size. But capital letters, particularly in a combination like "WY", are likely to require more space. In this case, setting maxchrs to 2 and xmax to 3 might be a good idea.

If maxchrs is omitted or equals zero, it is treated as being equal to xmax.

Horizontal scrolling: The parameter maxchrs, which is only supported in the A-Shell version of INFLD, may be used to specify a maximum horizontal scrolling width. If specified, and if larger than xmax (the field editing width) then the field will support up to maxchrs characters, scrolling horizontally as required within the display window defined by row, col and xmax.

As a convenience, especially to those interested in using the horizontal scrolling feature but who do not care about color, the infclr parameter (normally a mapped structure) may be reduced to numeric zero. Thus, for example, you can call INFLD to input an alphanumeric scrolling field with an editing window width of 60 characters and a maximum width of 150 characters as follows:

xcall INFLD, row, col, 60, 0, "a", entry, inxctl, 1, 0, exitcode, timer, 0, -1, -1, 0, "", 0, "", 150