Highlight (ScreenField property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
 
 
(13 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This property sets or returns the value of the highlight for a ScreenField. This value is a ScreenField class enumeration. This attribute is initially set for a field by the [[Screen class#AddField function|AddField method]].
{{Template:ScreenField:Highlight subtitle}}
The <var>Highlight</var> property sets or returns the value of the highlight for a <var>ScreenField</var>. The <var>[[#Highlight enumeration|Highlight]]</var> enumeration provides the highlight value.


  %sfield:Highlight = value
This attribute is initially set for a field by the <var>[[AddField_(Screen_function)|AddField]]</var> method.
  value = %sfield:Highlight


; Highlight syntax
==Syntax==
{{Template:ScreenField:Highlight syntax}}


; value
===Syntax terms===
: An enumeration of type Highlight. Valid values are none, underline, reverse, and blink. The default value is none.
<table class="syntaxTable">
<tr><th>%currentHightlight</th>
<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>sfield</th>
<td>A reference to an instance of a <var>ScreenField</var> object.</td></tr>
<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>
</table>


; %sfield
==Usage notes==
: A reference to an instance of a ScreenField object.
<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>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.
</ul>


; Usage Notes
<li>Default field highlights may be set by the <var>[[ProtectedHighlight_(Screen_property)|ProtectedHighlight]]</var> or <var>[[UnprotectedHighlight_(Screen_property)|UnprotectedHighlight]]</var> properties.
</ul>


The Highlight method lets you set highlights regardless of the actual terminal type, although some terminals may not display these attributes correctly. Also, many terminal emulator programs allow local customization of highlighting attributes. Under either of these conditions, which are not detectable by the Screen methods, the actual display may not show the intended highlighting.
==Examples==
For an example using <var>Highlight</var> method calls, see [[Screen object sample code|"Screen object sample code"]].


For an example using Highlight method calls, see “[[Screen class example]]”.
==See also==
{{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