backgroundPattern | |||||||
Type | property | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Synonyms | backpattern,fillpat | ||||||
Associations | stack, card, field, button, graphic, scrollbar, player, image, group | ||||||
Summary | The backgroundPattern specifies the pattern used to draw an object's background. | ||||||
Introduced | 1.0 | ||||||
Changes | The ability to use the system background pattern was introduced in version 1.1. In previous versions, if the backgroundColor and backgroundPattern of all objects in the object hierarchy was empty, a light gray color was used. | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Example |
| ||||||
Values |
| ||||||
Related | Keyword: effective, field, image, button, card, scrollbar, player, graphic, control Property: metal, pixels, opaque, patterns, width, height, style, backgroundPattern, lookAndFeel, menuMode, foregroundPattern, backgroundColor, owner, shadowPattern Command: group Function: stacks Glossary: object, tabbed button, property, stack window, button menu, Windows, video clip, OS X, keyword, audio clip, chunk, object hierarchy, Mac OS, Unix, object type, EPS, current stack Object: graphic, button, field, stack | ||||||
Description | Use the backgroundPattern property to specify the pattern used for the background on which an image appears, or the pattern used to draw an object. Pattern images can be color or black-and-white. *Cross-platform note:* To be used as a pattern on Mac OS systems, an image must be 128x128 pixels or less, and both its height and width must be a power of 2, however, in LiveCode version 2.7, this restriction was partially lifted and the engine will tile rectangular regions correctly with arbitrarily sized background patterns.To be used on Windows and 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 backgroundPattern of controls is drawn starting at the control's upper left corner: if the control is moved, the pattern does not shift. Setting the backgroundPattern of an object to empty allows the backgroundPattern of the object's owner to show through. Use the effective keyword to find out what pattern is used for the object, even if its own backgroundPattern is empty. The setting of the backgroundPattern property has different effects, depending on the object type:
*Cross-platform note:* On Mac OS, OS X, and Windows systems, if the backgroundColor and backgroundPattern of all objects in the object hierarchy is empty, the background set by the system is used.
*Cross-platform note:* If the lookAndFeel is set to "Appearance Manager", standard and rectangle buttons are drawn by the operating system if the backgroundColor and backgroundPattern of the button is empty. Otherwise, the button is drawn by LiveCode. If the lookAndFeel is "Appearance Manager", button menus whose menuMode is set to "option" or "comboBox" are always drawn by the operating system, and the setting of the backgroundPattern does not affect them.
If an object's backgroundPattern is set, the pattern is shown instead of the color specified by backgroundColor. | ||||||
Tags | ui |