Color (ScreenField property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (match syntax table to syntax template; edits, tags and links)
Line 1: Line 1:
{{Template:ScreenField:Color subtitle}}
{{Template:ScreenField:Color subtitle}}
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>.


The <var>[[#FieldColor enumeration|FieldColor]]</var> enumeration provides the color value. This attribute is initially set for a field by the [[Screen class#AddField function|AddField method]].
==Syntax==
==Syntax==
{{Template:ScreenField:Color syntax}}
{{Template:ScreenField:Color syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>fieldcolor</th>
<tr><th><var>currentFieldcolor</var></th>
<td>A FieldColor enumeration (see below). </td></tr>
<td>A <var>FieldColor</var> enumeration (see below) to get <var class="term">sField</var>'s current color.</td></tr>
<tr><th>%sfield</th>
<tr><th><var>sfield</var></th>
<td>A reference to an instance of a ScreenField object.</td></tr>
<td>A reference to an instance of a <var>ScreenField</var> object.</td></tr>
<tr><th><var>newFieldcolor</var></th>
<td>A <var>FieldColor</var> enumeration (see below) setting the color for the <var class="term">sField</var>. </td></tr>
</table>
</table>
===FieldColor enumeration===
===FieldColor enumeration===
The valid values (case unimportant) of this enumeration are turquoise, green, blue, red, white, yellow, and pink. The default is blue.  
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>.  
 
==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>The <var>Color</var> property 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.
</ul></ul>


The Color property lets you set colors regardless of the actual terminal type, although some terminals may not display these attributes correctly. Also, many terminal emulator programs allow local customization of color attributes. Under either of these conditions, which are not detectable by the screen methods, the
==Examples==
display may not show the intended colors.
<ol><li>For an example using <var>Color</var> method calls, see [[Screen Object Sample Code|"Screen Object Sample Code"]].
</ol>


For an example using Color method calls, see &amp;#x201C;[[Screen class example]]&amp;#x201D;.
==See also==
==See also==
<ul><li>Default field colors may be set by the <var>[[ProtectedColor_(Screen_property)|ProtectedColor]]</var> or <var>[[UnprotectedColor_(Screen_property)|UnprotectedColor]]</var> properties.
</ul> 
{{Template:ScreenField:Color footer}}
{{Template:ScreenField:Color footer}}

Revision as of 07:55, 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:
    • The Color property 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