Error getting tags :
error 404Error getting tags :
error 404 backgroundColor | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Expander triangle

set the backgroundColor of object to {empty | colorName | RGBColor}

set the backgroundColor of [chunk of] field to {empty|colorName|RGBColor}

Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
None required
Specifies an object's background color.

set the backgroundColor of last button to "white"
set the backgroundColor of graphic 2 to 128,128,128
set the backgroundColor of word thisWord of field "Help!" to "#808080"
get the effective backgroundColor of this card

Additional Comments
Expander triangle

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.


The backgroundColor of an object is a color reference.

The colorName is any standard color name.

The RGBColor consists of three comma-separated integers between zero and 255, specifying the level of each of red, green, and blue; or an HTML-style color consisting of a hash mark (#) followed by three hexadecimal numbers, one for each of red, green, and blue.

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:

* The backgroundColor of a stack or card fills the entire stack window, as well as determining the backgroundColor of each object in the stack or card that does not have its own backgroundColor.

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.

* The backgroundColor of a group determines the backgroundColor of each object in the group that does not have its own backgroundColor.

* The backgroundColor of a button fills the area inside the button's outline. If the button's style is "checkbox", the backgroundColor fills the checkbox. If the button's style is "radioButton", the backgroundColor has no effect. If the button is a tabbed button, the backgroundColor fills the tab area and the frontmost tab, but does not affect the other tabs.

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 Revolution. 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.

* The backgroundColor of a field fills the area inside the field's outline. If you set the backgroundColor of a chunk of a field, only that chunk is affected. For example, to create a "highlighter pen" effect on a single word, set the word's backgroundColor to yellow. If a chunk of text contains runs of text with more than one background color, the backgroundColor of that chunk reports "mixed".

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 backgroundColor of a scrollbar fills the arrow boxes at the ends of the scrollbar.

* The backgroundColor of a graphic is displayed inside the graphic's border if the graphic's fill property is true. If the graphic's fill is false, the setting of the backgroundColor has no effect.

* The backgroundColor of an EPS object fills the object's rectangle.

* The backgroundColor of an image is the second color in the image's color palette.

* The backgroundColor of a player, audio clip, or video clip has no effect.

Changes to Revolution:

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.

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.

User Comments
Expander triangle