backgroundColor | ||||||||||
Type | property | |||||||||
Dictionary | LCS | |||||||||
Library | LiveCode Script | |||||||||
Syntax |
| |||||||||
Synonyms | backcolor,secondcolor | |||||||||
Associations | stack, card, field, button, graphic, scrollbar, player, image, group | |||||||||
Summary | Specifies an object's background color. | |||||||||
Introduced | 1.0 | |||||||||
Changes | The ability of standard buttons to have a backgroundColor under Appearance Manager was introduced in version 2.0. In previous versions, if the lookAndFeel was set to "Appearance Manager", the setting of the backgroundColor had no effect on standard buttons. | |||||||||
OS | mac, windows, linux, ios, android | |||||||||
Platforms | desktop, server, mobile | |||||||||
Parameters |
| |||||||||
Example |
| |||||||||
Related | Keyword: image, effective, field, button, word, player, card, scrollbar, graphic, colorPalette Property: leftIndent, topColor, borderWidth, vgrid, backgroundPattern, textAlign, dontWrap, formattedText, spaceAbove, menuMode, brushColor, listBehavior, listIndent, linkColor, hidden, textSize, firstIndent, tabstops, spaceBelow, listStyle, style, rightIndent, listDepth, hgrid, foregroundColor, linkHiliteColor, hScrollbar, owner, lookAndFeel, borderColor, formattedWidth Command: answer color, group Object: button, image, field, stack, graphic Glossary: object, video clip, property, tabbed button, highlight, stack window, object type, Mac OS, OS X, chunk, object hierarchy, color palette, button menu, keyword, audio clip, EPS, owner, Windows, word | |||||||||
Description | Use the backgroundColor property to change the background of a window, or the color that fills an object, or to change the background color of text for a highlighted effect. By default, the backgroundColor for all objects is empty. Setting the backgroundColor of an object to empty allows the backgroundColor of the object's owner to show through. Use the effective keyword to find out what color is used for the object, even if its own backgroundColor is empty. If an object's backgroundPattern is set, the pattern is shown instead of the color specified by backgroundColor. The setting of the backgroundColor property has different effects, depending on the object type:
*Cross-platform note:* On Mac OS, OS X, and Windows systems, if the backgroundColor of all objects in the object hierarchy is empty, the background color 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. (In this case, none of the button's color properties have an effect except for the foregroundColor or foregroundPattern.) 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 backgroundColor does not affect them.
If a field's backgroundColor is empty and the lookAndFeel property is set to "Macintosh", "Appearance Manager", or "Windows 95", the field background is white, instead of inheriting its owner's color.
The ability to use the system background color was introduced in version 1.1. In previous versions, if the backgroundColor of all objects in the object hierarchy was empty, a light gray color was used. | |||||||||
Tags | ui |