xmax specifies the editing (or display) width of the field. Unless maxchrs is set to another non-zero value, xmax is also equivalent to the maximum number of characters which can be entered. Additional GUI-related attributes may be specified via the ST_INFXMAX structure; see below.
In text mode (with a non-GUI-enabled terminal emulation), the field width will be indicated by marker characters (typically underlines, unless type |p or type i or type I is specified). In text mode with a GUI enabled emulation (i.e. PCTDVG, AM76G or AM62CG), a pseudo-Windows-style sunken panel is used. (This may be hard to see unless the background color is pastel or gray; if not, you may want to force the use of underlines with type |_ .)
In full GUI mode (GUI-enabled driver, type |G), the field size will be indicated by the size of the Windows control (edit box, combo box, checkbox, radio button, time/date, up/down) used. The overall width of the control, however, may be somewhat larger than the number of grid width units specified, in order to allow for parts of the control outside of the input area (like drop-down buttons), or, when xmax is very small, to allow for the fact that upper case GUI characters may be wider than their text equivalents. See type ||] to disable this auto-expansion feature.
ST_INFXMAX
The ST_INFXMAX structure may be used in place of xmax to specify additional GUI-related attributes not previously available via the INFLD interface but otherwise available with AUI_CONTROL.
defstruct ST_INFXMAX
map2 erow,b,4 ! rows, millirows or pixels
map2 ecol,b,4 ! columns, millicolumns, or pixels
map2 flags,b,4 ! see IMXF_xxx below
map2 fontattr,b,4 ! same as in AUI_CONTROL
map2 fontscale,b,4 ! " " "
map2 fontface,s,32 ! " " "
endstruct
define IMXF_FNTPTSIZE = &h00000001 ! fontscale is in points*10
define IMXF_PIXCOORDS = &h00000002 ! all coordinates in pixels [101]
define IMXF_XMAXONLY = &h40000000 ! erow=xmax; all other fields ignored
A structure definition include file, ASHINC:INFLD.SDF defines the ST_INFXMAX structure.
Notes
• | Minus signs in numeric fields do not count against the maximum number of characters. |
• | The specified xmax value may be trimmed by INFLD to be no greater than the physical size of the entry parameter. One situation where this can be unexpected is when using Coded Lists. |
• | When using pixel coordinates, INFLD checks that maxchrs <> 0, since otherwise there is no way to determine the character limits on the field size. If 0, it displays a warning message and sets it to 132. |
History
2012 June, A-Shell 6.1.1312: ST_INFXMAX structure added