forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackgroundColor.lcdoc
More file actions
175 lines (129 loc) · 6.92 KB
/
Copy pathbackgroundColor.lcdoc
File metadata and controls
175 lines (129 loc) · 6.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
Name: backgroundColor
Synonyms: backcolor, secondcolor
Type: property
Syntax: set the backgroundColor of <object> to {empty | <colorName> | <RGBColor>}
Syntax: set the backgroundColor [of <chunk>] [of <line>] of <field> to {empty| <colorName> | <RGBColor>}
Summary:
Specifies an <object|object's> background color.
Associations: stack, card, field, button, graphic, scrollbar, player,
image, group
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
set the backgroundColor of last button to "white"
Example:
set the backgroundColor of graphic 2 to 128,128,128
Example:
set the backgroundColor of word thisWord of field "Help!" to "#808080"
Example:
get the effective backgroundColor of this card
Example:
-- Set the background color of a paragraph of text in a field
set the backgroundColor of line 1 of field 1 to red
Parameters:
colorName:
Any standard color name.
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.
Description:
Use the <backgroundColor> <property> to change the background of a
window, or the color that fills an <object(glossary)>, or to change the
background color of text for a <highlight|highlighted> effect.
By default, the <backgroundColor> for all <object|objects> is empty.
Setting the <backgroundColor> of an <object(glossary)> to empty allows
the <backgroundColor> of the <object|object's> <owner(property)> to show
through. Use the <effective> <keyword> to find out what color is used
for the <object(glossary)>, 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(glossary)> in the <stack> or <card> that does not have its own
<backgroundColor>.
>*Cross-platform note:* On <Mac OS>, <OS X>, and <Windows|Windows systems>,
> if the <backgroundColor> of all <object|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(glossary)> in the <group> that does not have its own
<backgroundColor>.
* The <backgroundColor> of a button fills the area inside the
<button(object)|button's> outline. If the button's <style> is
"checkbox", the <backgroundColor> fills the checkbox. If the
<button(object)|button's> style is "radioButton", the
<backgroundColor> has no effect. If the <button(keyword)> 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 <button(object)|buttons>
> are drawn by the operating system if the <backgroundColor> and
> <backgroundPattern> of the <button(keyword)> is empty. (In this case,
> none of the <button(object)|button's> color <property|properties> have
> an effect except for the <foregroundColor> or <foregroundPattern>.)
> Otherwise, the <button(keyword)> is drawn by LiveCode. If the
> <lookAndFeel> is "Appearance Manager", <button menu|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(keyword)> fills the area inside the
<field(object)|field's> outline. If you set the <backgroundColor> of a
<chunk> of a <field(keyword)>, only that <chunk> is affected. For
example, to create a "highlighter pen" effect on a single
<word(keyword)>, set the <word(glossary)|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(keyword)> background is white, instead of inheriting its
<owner(glossary)|owner's> color.
* The <backgroundColor> of a <scrollbar> fills the arrow boxes at the
ends of the <scrollbar>.
* The <backgroundColor> of a <graphic(keyword)> is displayed inside the
<graphic(object)|graphic's> border if the <graphic(object)|graphic's>
fill <property> is true. If the <graphic(object)|graphic's> fill is
false, the setting of the <backgroundColor> has no effect.
* The <backgroundColor> of an <EPS|EPS object> fills the
<object|object's> rectangle.
* The <backgroundColor> of an <image(keyword)> is the second color in
the <image(object)|image's> <color palette>.
* The <backgroundColor> of a <player>, <audio clip>, or <video clip> has
no effect.
The ability to use the system background color was introduced in version
1.1. In previous versions, if the <backgroundColor> of all
<object|objects> in the <object hierarchy> was empty, a light gray color
was used.
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 <button|buttons>.
References: answer color (command), group (command), object (glossary),
video clip (glossary), property (glossary),
tabbed button (glossary), highlight (glossary), stack window (glossary),
object type (glossary), Mac OS (glossary), OS X (glossary),
chunk (glossary), object hierarchy (glossary), color palette (glossary),
button menu (glossary), keyword (glossary), audio clip (glossary),
EPS (glossary), owner (glossary),
Windows (glossary), word (glossary), image (keyword), effective (keyword),
field (keyword), button (keyword), word (keyword), player (keyword),
card (keyword), scrollbar (keyword), graphic (keyword),
colorPalette (keyword), button (object), image (object), field (object),
stack (object), graphic (object), leftIndent (property),
topColor (property), borderWidth (property), vgrid (property),
backgroundPattern (property), textAlign (property), dontWrap (property),
formattedText (property), spaceAbove (property), menuMode (property),
brushColor (property), listBehavior (property), listIndent (property),
linkColor (property), hidden (property), textSize (property),
firstIndent (property), tabstops (property), spaceBelow (property),
listStyle (property), style (property), rightIndent (property),
listDepth (property), hgrid (property), foregroundColor (property),
linkHiliteColor (property), hScrollbar (property), owner (property),
lookAndFeel (property), borderColor (property), formattedWidth (property),
Tags: ui