Name
swatchview — A simple space-filling colored view.
Description
A simple view that is filled with a single color.
Either 'fgcolor' and 'bgcolor' may be used to set the color of the view.
By default it fills the space of the parent with white.
Unlike with other views, setColorTransform will affect the bgcolor of the view.
swatchview is a simple view that is filled with a single color.
Either 'fgcolor' and 'bgcolor' may be used to set the color of the view.
By default it fills the space of the parent with white
Details
Properties (2)
-
color
-
<attribute name="color" value="0xffffff" />
public read-only var color;
this is the color that was set (by setting 'bgcolor' or 'fgcolor' ),
bgcolor may be different if setColorTransform has been called
-
fgcolor
-
<attribute name="fgcolor" />
setting the fgcolor attribute is equivalent to setting bgcolor
Methods (2)
-
setBGColor()
-
<method name="setBGColor" args="c" />
public function setBGColor(c : Number);
sets the bgcolor with the color transform applied
-
setColorTransform()
-
<method name="setColorTransform" args="o" />
public function setColorTransform(o : Object);
affects the bgcolor, unlike in regular views where only the
resource and subviews are affected by the color transform
LZX Synopsis
<class name="
swatchview" extends="
LzView
">
<attribute name="
color
" value="
0xffffff" />
</class>
JavaScript Synopsis
public
swatchview extends
LzView
{
public read-only var
color
;
prototype public function
setBGColor
(
c : Number);
}