Highlight (ScreenField property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
 
(5 intermediate revisions by 3 users not shown)
Line 6: Line 6:
==Syntax==
==Syntax==
{{Template:ScreenField:Highlight syntax}}
{{Template:ScreenField:Highlight syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th><var>currentHightlight</var></th>
<tr><th>%currentHightlight</th>
<td>An enumeration of type <var>Highlight</var> (see below) to get <var class="term">sField</var>'s current hightlight.</td></tr>
<td>An enumeration of type <var>[[Screen classes#Highlight enumeration|Highlight]]</var> to get <var class="term">sfield</var>'s current hightlight.</td></tr>
<tr><th><var>sfield</var></th>
<tr><th>sfield</th>
<td>A reference to an instance of a <var>ScreenField</var> object.</td></tr>
<td>A reference to an instance of a <var>ScreenField</var> object.</td></tr>
<tr><th><var>newHightlight</var></th>
<tr><th>newHighlight</th>
<td>An enumeration of type <var>Highlight</var> (see below) setting <var class="term">sField</var>'s new hightlight.</td></tr>
<td>An enumeration of type <var>Highlight</var> (see below) setting <var class="term">sfield</var>'s new hightlight.</td></tr>
</table>
</table>
===Highlight enumeration===
Valid values of this enumeration are <code>None</code>, <code>Underline</code>, <code>Reverse</code>, and <code>Blink</code>. The default value is <code>None</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>
<ul><li><var>Highlight</var> lets you set highlights regardless of the actual terminal type, although some terminals may not display these attributes correctly.
<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>Highlight</var> lets you set highlights regardless of the actual terminal type, although some terminals may not display these attributes correctly.
<li>Many terminal emulator programs allow local customization of highlighting attributes.
<li>Many terminal emulator programs allow local customization of highlighting attributes.
</ul></ul>
</ul>
 
<li>Default field highlights may be set by the <var>[[ProtectedHighlight_(Screen_property)|ProtectedHighlight]]</var> or <var>[[UnprotectedHighlight_(Screen_property)|UnprotectedHighlight]]</var> properties.
</ul>


==Examples==
==Examples==
Line 29: Line 32:


==See also==
==See also==
<ul><li>Default field highlights may be set by the <var>[[ProtectedHighlight_(Screen_property)|ProtectedHighlight]]</var> or <var>[[UnprotectedHighlight_(Screen_property)|UnprotectedHighlight]]</var> properties.
</ul>
{{Template:ScreenField:Highlight footer}}
{{Template:ScreenField:Highlight footer}}

Latest revision as of 18:06, 20 November 2012

Set or return the highlight attribute for screenfield (ScreenField class)

The Highlight property sets or returns the value of the highlight for a ScreenField. The Highlight enumeration provides the highlight value.

This attribute is initially set for a field by the AddField method.

Syntax

%currentHighlight = sfield:Highlight sfield:Highlight = newHighlight

Syntax terms

%currentHightlight An enumeration of type Highlight to get sfield's current hightlight.
sfield A reference to an instance of a ScreenField object.
newHighlight An enumeration of type Highlight (see below) setting sfield's new hightlight.

Usage notes

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

Examples

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

See also