infclr

Reviewed July 2020

infclr allows the specification of various color palettes which are then automatically invoked for the corresponding situations. If specified, it must be mapped as in the file infpar.bsi. See the following topic for an alternative.

The effect of any of these colors can be disabled by setting it to -1, which causes INFLD to use the color setting which was in effect when INFLD was called. The standard AM72 color selections range from 0-15, where 0 is usually black, so if your field seems to disappear, you should check if you accidentally left any of the color palettes 0 on 0 (black on black).

Color

Codes

Description

Display

DFCLR, DBCLR

Used when INFLD is called to display a field (OPCODES 2, 4, 10 and 12). The editing colors (EFCLR and EBCLR) are used while you are editing a field (unless it is a negative number). Setting DFCLR and/or DBCLR to a palette index value +64 overrides the theme color (provided you don't have the Settings > Misc option to "Force standard colors in edit boxes" set).

Negative

NFCLR, NBCLR

Override the editing palette whenever the field contains a negative number. The color change occurs instantly whenever you enter the minus sign or plus sign keys to change a number's sign.

Negative foreground

NFCLR

Also overrides the display and update foreground colors (DFCLR and UFCLR) whenever the field is negative. Typically, NFCLR will be red (#4 on the standard AM72 palette).

Update

UFCLR, UBCLR

Used to redisplay the field after editing, regardless of whether the field was changed. The intent of this feature is to indicate which fields have been edited on a "CHANGE" screen; we recommend a color very similar to the display color.

Message

MFCLR, MBCLR

Used for displaying any auxiliary messages, like time out, invalid entry, help available, etc.

Original

OFCLR, OBCLR

Used when clearing any messages. You should set them to match the normal color scheme of the area where messages will be displayed. These are also used to specify the color scheme for the text portion of a checkbox or radio box. See TYPEs "||c" and ""||r" in the GUI-related Codes section.

Forms

FFCLR, FBCLR

Used to display the literal characters embedded in a form string (see type f.)

 

INFLD will automatically return to the pre-existing color scheme on exiting from a field, so you do not need to worry about it changing your ambient colors.

INFLD does not check whether your terminal supports color, relying instead on your terminal driver to discard unsupported commands. You should program as if color was supported, since in most cases, color will have no effect on monochrome screens (unlike the PC where color commands may be interpreted as other video effects on monochrome monitors). However, by passing all color commands to the terminal driver, we leave you the option of modifying the driver to substitute color commands for some other attribute. (Should you attempt this, note that the color commands should not occupy a space, and operate as mode attributes.)

Note: In GUI mode, there is a convenient option in the Misc. Settings dialog which overrides infclr to force INFLD to use the standard Windows color scheme (typically black text within a white edit box). See History, below.

The infclr parameters will be ignored in both of the following situations: 1) When the "Force standard Windows colors in edit boxes" option is checked (in the Misc. Settings Dialog); 2) When Windows Themes are active.

As a convenience to those not interested in infclr but who want to use a subsequent parameter, 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

History

2013 August, 6.1.1360:  Added topic ST_INFCLRX, which see for details.

2013 July, 6.1.1355:  When the "Force standard colors in edit boxes" option is set in the Misc. Settings dialog, INFLD will now display negative values (for fields with the "-" TYPE code) in red, regardless of the INFCLR settings. INFCLR is largely ignored when the "Force standard colors" option is set.

2011 June, 5.1.1220:  Checkboxes and radiobuttons now automatically use the transparent background feature, UNLESS the OBCLR field of the INFCLR parameter is greater than zero.

2010 June, 5.1.1184:  Setting the DFCLR and/or DBCLR fields of the INFCLR structure to a palette index value +64 now overrides the theme color (provided you don't have the Settings > Misc option to "Force standard colors in edit boxes" set).