Color (ScreenField property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (unvar)
mNo edit summary
Line 17: Line 17:


===FieldColor enumeration===
===FieldColor enumeration===
The valid values (case unimportant) of this enumeration are <code>turquoise</code>, <code>green</code>, <code>blue</code>, <code>red</code>, <code>white</code>, <code>yellow</code> and <code>pink</code>. The default is <code>blue</code>.  
The valid values (case unimportant) of this [[Enumerations|enumeration]] are <var>turquoise</var>, <var>green</var>, <var>blue</var>, <var>red</var>, <var>white</var>, <var>yellow</var> and <var>pink</var>. The default is <var>blue</var>.
 
'''Note:''' As with all enumerations, the <var>ToString</var> method implicitly converts an enumeration value to a character string whose value is the name of the enumeration value. For more information about methods available to all enumerations, see [[Enumerations#Common enumeration methods|"Common enumeration methods"]].


==Usage notes==
==Usage notes==
Line 26: Line 28:


==Examples==
==Examples==
<ol><li>For an example using <var>Color</var> method calls, see [[Screen object sample code|"Screen object sample code"]].
For an example using <var>Color</var> method calls, see [[Screen object sample code|"Screen object sample code"]].
</ol>


==See also==
==See also==

Revision as of 21:06, 16 August 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.

Note: As with all enumerations, the ToString method implicitly converts an enumeration value to a character string whose value is the name of the enumeration value. For more information about methods available to all enumerations, see "Common enumeration methods".

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

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

See also