Using styles with the DataGrid component
You can set style properties to change the appearance of a DataGrid component. The DataGrid
component inherits styles from the List component. (See
on page
453.) The DataGrid component also supports the following styles:
Style
backgroundColor
backgroundDisabledColor
border styles
headerColor
headerStyle
color
disabledColor
embedFonts
fontFamily
fontSize
fontStyle
fontWeight
textAlign
textDecoration
vGridLines
252
Chapter 6: Components Dictionary
Theme Description
Both
The background color, which can be set for the whole grid or
for each column.
Both
The background color when the component's
property is set to
(medium gray).
Both
The DataGrid component uses a RectBorder instance as its
border and responds to the styles defined on that class. See
"RectBorder class" on page
The default border style value is
Both
The color of the column headers. The default value is
0xEAEAEA (light gray)
Both
A CSS style declaration for the column header that can be
applied to a grid or column to customize the header styles.
Both
The text color. The default value is 0x0B333C for the Halo
theme and blank for the Sample theme.
Both
The color for text when the component is disabled. The
default color is 0x848384 (dark gray).
Both
A Boolean value that indicates whether the font specified in
is an embedded font. This style must be set to
fontFamily
if
true
fontFamily
the embedded font will not be used. If this style is set to
and
fontFamily
will be displayed. The default value is
Both
The font name for text. The default value is
Both
The point size for the font. The default value is 10.
Both
The font style: either
is
.
"normal"
Both
The font weight: either
is
. All components can also accept the value
"none"
in place of
"normal"
subsequent calls to
Both
The text alignment: either
default value is
Both
The text decoration: either
default value is
Both
A Boolean value that indicates whether to show vertical grid
lines (
) or not (
true
"Using styles with the List component"
. The default value is 0xDDDDDD
"false"
647.
"inset"
refers to an embedded font. Otherwise,
does not refer to an embedded font, no text
false
or
"normal"
"italic"
or
"none"
"bold"
during a
"none"
setStyle()
will return
getStyle()
,
"left"
"right"
.
"left"
or
"none"
"underline"
.
"none"
). The default value is
false
enabled
.
true
.
.
"_sans"
. The default value
. The default value
call, but
.
"none"
, or
. The
"center"
. The
.
true
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?