Color (ScreenField property): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Template:ScreenField:Color subtitle}} | {{Template:ScreenField:Color subtitle}} | ||
The <var>Color</var> sets or returns the <var>[[Screen classes#FieldColor enumeration|FieldColor]]</var> | The <var>Color</var> method sets or returns the color value (<var>[[Screen classes#FieldColor enumeration|FieldColor]]</var> enumeration) of a <var>ScreenField</var>. | ||
Colors may be initially set for a field when it is created by the <var>[[AddField_(Screen_function)|AddField]]</var> method. | Colors may be initially set for a field when it is created by the <var>[[AddField_(Screen_function)|AddField]]</var> method. | ||
Line 6: | Line 6: | ||
==Syntax== | ==Syntax== | ||
{{Template:ScreenField:Color syntax}} | {{Template:ScreenField:Color syntax}} | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
Line 17: | Line 18: | ||
==Usage notes== | ==Usage notes== | ||
<ul><li> | <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><var>Color</var> 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> | ||
<li>Default field colors may be set by the <var>[[ProtectedColor_(Screen_property)|ProtectedColor]]</var> or <var>[[UnprotectedColor_(Screen_property)|UnprotectedColor]]</var> properties. | |||
</ul> | |||
==Examples== | ==Examples== | ||
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"]]. | ||
==See also== | ==See also== | ||
{{Template:ScreenField:Color footer}} | {{Template:ScreenField:Color footer}} |
Revision as of 17:55, 20 November 2012
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".