Color (ScreenField property)

From m204wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Set or return the FieldColor for a screenfield (ScreenField class)

The Color method sets or returns the color value (FieldColor enumeration) of a ScreenField.

Colors may be initially set for a field when it is created by the AddField method.

Syntax

%currentFieldColor = sfield:Color sfield:Color = newFieldColor

Syntax terms

%currentFieldcolor A FieldColor enumeration to get sfield's current color.
sfield A reference to an instance of a ScreenField object.
newFieldcolor A FieldColor enumeration setting the color for the sfield.

Usage notes

  • Under either of these conditions, which are not detectable by the screen methods, the display may not show the intended colors:
    • Color lets you set colors regardless of the actual terminal type, although some terminals may not display these attributes correctly.
    • Many terminal emulator programs allow local customization of color attributes.
  • Default field colors may be set by the ProtectedColor or UnprotectedColor properties.

Examples

For an example using Color method calls, see "Screen object sample code".

See also