Background.property DataWindow object property
Description
Settings for the color and transparency of a control.
Controls
Button, Column, Computed Field, GroupBox, Line, Oval, Rectangle, RoundRectangle,
and Text controls
Syntax
PowerBuilder dot notation:
1 |
<span>dw_control</span>.Object.<span>controlname</span>.Background.<span>property</span> |
Describe and Modify argument:
1 |
"<span>controlname</span>.Background.<span>property </span>{ = ' <span>value </span>' }" |
DataWindowSyntaxFromSql:
1 |
Column ( Background.<span>property </span>= <span>value</span> )<br>Text ( Background.<span>property </span>=<span> value</span> ) |
Parameter |
Description |
---|---|
controlname |
The control whose Background properties When generating DataWindow syntax with DataWindowSyntaxFromSql, the Background |
property |
A property that applies to the background |
value |
Values for the properties are shown below. Value can |
Property for Background |
Value |
---|---|
Brushmode |
(exp) An integer Values are: Painter: Background tab, Gradient group (not available in RichText, |
Color |
(exp) A long expression Painter: Background tab |
Mode |
(exp) A number expression Values are:
|
Transparency |
(exp) An integer Painter: Background tab. |
Gradient.Angle |
(exp) An integer Painter: Background tab, Gradient group. |
Gradient.Color |
(exp) A long specifying Painter: Background tab, Gradient group. |
Gradient.Focus |
(exp) An integer Painter: Background tab, Gradient group |
Gradient.Repetition.Mode |
(exp) Specifies Permitted values and their meanings are:
Painter: Background tab, Gradient group. |
Gradient.Repetition.Count |
(exp) An integer Painter: Background tab, Gradient group. |
Gradient.Repetition.Length |
(exp) A long specifying Painter: Background tab, Gradient group. |
Gradient.Scale |
(exp) An integer Painter: Background tab, Gradient group |
Gradient.Spread |
(exp) An integer Painter: Background tab, Gradient group |
Gradient.Transparency |
(exp) An integer Painter: Background tab, Gradient group. |
Usage
In the painter
Select the control and set the value in the Properties view,
Font tab for controls that have text and in the General tab for
drawing controls (choose Transparent or a color).
When you choose a Brush Hatch fill pattern other than Solid
for an Oval, Rectangle, or RoundRectangle control, the Background
Color and the Brush Color are used for the pattern colors.
Background color of a button
The Background.Color property is not supported on Windows
XP by default because the current XP theme controls the appearance
of the button. Set the ShowBackColorOnXP property of the DataWindow object
to force the color change to take effect.
Background color of a line
The background color of a line is the color that displays
between the segments of the line when the pen style is not solid.
Transparent background
If Background.Mode is transparent (1), Background.Color is
ignored.
Background gradient properties
Background gradient and transparency properties do not apply
to DataWindow objects with the RichText, Graph, or OLE presentation
style, and do not apply to the Line control.
DropDownDataWindows and GetChild
When you set Background.Color and Background.Mode for a column
with a DropDownDataWindow, references to the DropDownDataWindow
become invalid. Call GetChild again after changing
these properties to obtain a valid reference.
Examples
1 |
dw1.Object.oval_1.Background.Color = RGB(255, 0, 128) |
1 |
ls_data = dw1.Describe("oval_1.Background.Color") |
1 |
dw1.Modify("emp_name.Background.Color='11665407'") |
1 |
ls_data = dw1.Describe("emp_name.Background.Mode") |
1 |
dw1.Modify("emp_name.Background.Mode='1'") |
1 |
dw1.Modify("rndrect_1.Background.Mode='0'") |
1 |
SQLCA.SyntaxFromSQL(sql_syntax, &<br>   "Style(...) Column(Background.Mode=1 ...) ...", &<br>   ls_Errors) |
1 |
SQLCA.SyntaxFromSQL(sql_syntax, &<br>  "Style(...) Column(Background.Color=11665407 ...)", &<br>  ls_Errors) |