Color (ScreenField property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (match syntax table to syntax template; edits, tags and links)
mNo edit summary
Line 2: Line 2:
The <var>Color</var> sets or returns the <var>[[#FieldColor enumeration|FieldColor]]</var> for a <var>ScreenField</var>.  The <var>[[#FieldColor enumeration|FieldColor]]</var> enumeration provides the color value.
The <var>Color</var> sets or returns the <var>[[#FieldColor enumeration|FieldColor]]</var> for a <var>ScreenField</var>.  The <var>[[#FieldColor enumeration|FieldColor]]</var> enumeration provides the color value.


Colors may be initially set for a field when it is created by the <var>[[Screen class#AddField function|AddField method]]</var>.
Colors may be initially set for a field when it is created by the <var>[[AddField_(Screen_function)|AddField]]</var> method.


==Syntax==
==Syntax==
Line 21: Line 21:
==Usage notes==
==Usage notes==
<ul><li>  Under either of these conditions, which are not detectable by the screen methods, the display may not show the intended colors:
<ul><li>  Under either of these conditions, which are not detectable by the screen methods, the display may not show the intended colors:
<ul><li>The <var>Color</var> property lets you set colors regardless of the actual terminal type, although some terminals may not display these attributes correctly.
<ul><li><var>Color</var> lets you set colors regardless of the actual terminal type, although some terminals may not display these attributes correctly.
<li>Many terminal emulator programs allow local customization of color attributes.
<li>Many terminal emulator programs allow local customization of color attributes.
</ul></ul>
</ul></ul>

Revision as of 08:20, 26 June 2011

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

The Color sets or returns the FieldColor for a ScreenField. The FieldColor enumeration provides the color value.

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 (see below) to get sField's current color.
sfield A reference to an instance of a ScreenField object.
newFieldcolor A FieldColor enumeration (see below) setting the color for the sField.

FieldColor enumeration

The valid values (case unimportant) of this enumeration are turquoise, green, blue, red, white, yellow and pink. The default is blue.

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.

Examples

  1. For an example using Color method calls, see "Screen Object Sample Code".

See also