Name: hilitePattern

Type: property

Syntax: set the hilitePattern of <object> to {<patternNumber> | <imageID> | empty}

Summary: Specifies the fill pattern used for the background when an <object>, or text in an <object>, is <highlight|highlighted>.

Synonyms: markerPattern,thirdPattern

Associations: stack,card,field,button,graphic,scrollbar,player,image

Introduced: 1.0

OS: mac,windows,linux,ios,android

Platforms: desktop,server,web,mobile

Example:
set the hilitePattern to 3859

Value:
The <hilitePattern> of an <object> is a pattern specifier.
A <patternNumber> is a built-in pattern number between 1 and 164. (These patterns correspond to LiveCode's built-in patterns 136 to 300.)

An <imageID> is the ID of an <image> to use for a pattern. LiveCode looks for the specified <image> first in the <current stack>, then in other open <stacks>.

By default, the <hilitePattern> for all <object|objects> is empty.

Description:
Use the <hilitePattern> <property> to specify the background pattern used for the <select|selected> text in a <field>, or the <highlight|highlighted> pattern of a clicked <object>, or the pattern of <graphic> markers.

Pattern images can be color or black-and-white.

>*Cross-platform note:*  To be used as a pattern on <Mac OS|Mac OS systems>, an <image> must be 128x128 <pixels> or less, and both its <height> and <width> must be a power of 2. To be used on <Windows> and <Unix|Unix systems>, <height> and <width> must be divisible by 8. To be used as a fully cross-platform pattern, both an image's dimensions should be one of 8, 16, 32, 64, or 128.

The <hilitePattern> of <control(object)|controls> is drawn starting at the <control(object)|control's> upper right corner: if the <control(keyword)> is moved, the pattern does not shift.

The setting of the <hilitePattern> <property> has different effects, depending on the <object type>:

* The <hilitePattern> of a <stack>, <card>, or <group> determines the <hilitePattern> of any <object> in the <stack>, <card>, or <group> that does not have its own <hilitePattern>.

* The <hilitePattern> of a button is used for the background of the button when it is <highlight|highlighted>. If the <button(keyword)> is a <menu>, the <hilitePattern> is used to <highlight> the <button(keyword)>, but not the active menu choice. The <hilitePattern> has no effect if the <button(keyword)> is a <tabbed button>. The <hilitePattern> has no effect until the <button(keyword)> is <highlight|highlighted>.

>*Cross-platform note:*  If the <lookAndFeel> is set to "Appearance Manager", standard and rectangle <button(object)|buttons> are drawn by the operating system if the <backgroundColor> and <backgroundPattern> of the <button(keyword)> and all of its <owner|owners> is empty. In this case, the <button(object)|button's> <hilitePattern> has no effect. Otherwise, the <button(keyword)> is drawn by LiveCode. If the <lookAndFeel> is "Appearance Manager", <button menu|button menus> whose <menuMode> is set to "option" are always drawn by the operating system, and the setting of the <button(object)|button's> <hilitePattern> does not affect them.

* The <hilitePattern> of a <field> determines the background color of text <selection|selections> in the <field>.

* The <hilitePattern> of a <scrollbar> fills the arrow boxes at the ends of the <scrollbar> when the arrows are clicked. The <hilitePattern> has no effect until the arrows are clicked.

* The <hilitePattern> of a <graphic>, <image>, <player>, or <EPS|EPS object> has no effect.

If the object's <hilitePattern> is set, the pattern is shown instead of the color specified by <hiliteColor>.

>*Note:* Unlike the <hiliteColor> <property>, the <hilitePattern> is not a <global> <property>. Setting the <hilitePattern> of an <object> to empty causes the <hilitePattern> of the <object|object's> <owner> to be used for the <object>.

References: bottomPattern (property), hiliteFill (property), pixels (property), hiliteColor (property), markerLineSize (property), field (keyword), image (keyword), button (keyword), menu (keyword), card (keyword), graphic (keyword), scrollbar (keyword), control (keyword), player (keyword), global (command), group (command), button (object), object (object), stack (object), control (object), owner (glossary), current stack (glossary), tabbed button (glossary), property (glossary), highlight (glossary), width (glossary), button menu (glossary), Windows (glossary), height (glossary), backgroundPattern (glossary), lookAndFeel (glossary), menuMode (glossary), backgroundColor (glossary), select (glossary), Mac OS (glossary), Unix (glossary), object type (glossary), selection (glossary), EPS (glossary), stacks (function)

Tags: ui
