Background.property
(DataWindow object)
Description
Settings for the color and transparency of a control.
Applies to
Button, Column, Computed Field, GroupBox, Line, Oval, Rectangle,
RoundRectangle, and Text controls
Syntax
PowerBuilder dot notation:
|
1 |
dw_control.Object.controlname.Background.property |
Describe and Modify argument:
|
1 |
"controlname.Background.property { = 'value ' }" |
SyntaxFromSql:
|
1 2 |
Column ( Background.property = value ) Text ( Background.property = value ) |
|
Parameter |
Description |
|---|---|
|
controlname |
The control whose Background properties you want to When generating DataWindow syntax with |
|
property |
A property that applies to the background of a |
|
value |
Values for the properties are shown below. |
|
Property for Background |
Value |
|---|---|
|
Brushmode |
(exp) An integer indicating the type of “brush” to Values Painter: Background tab, Gradient group (not |
|
Color |
(exp) A long expression specifying the color (the Painter: Background |
|
Mode |
(exp) A number expression specifying the mode of Values 0 — Make the control’s background 1 — make the control’s background |
|
Transparency |
(exp) An integer in the range 0 to 100, where 0 Painter: |
|
Gradient.Angle |
(exp) An integer indicating the angle in degrees Painter: Background tab, Gradient |
|
Gradient.Color |
(exp) A long specifying the color (the red, green, Painter: |
|
Gradient.Focus |
(exp) An integer in the range 0 to 100, specifying Painter: Background tab, Gradient |
|
Gradient.Repetition.Mode |
(exp) Specifies the mode for determining the number Permitted values and their
Painter: Background tab, Gradient |
|
Gradient.Repetition.Count |
(exp) An integer specifying the number of gradient Painter: Background tab, Gradient |
|
Gradient.Repetition.Length |
(exp) A long specifying the number of gradient Painter: Background tab, |
|
Gradient.Scale |
(exp) An integer in the range 0 to 100 specifying Painter: Background tab, Gradient |
|
Gradient.Spread |
(exp) An integer in the range 0 to 100 indicating Painter: Background tab, Gradient |
|
Gradient.Transparency |
(exp) An integer in the range 0 to 100, where 0 Painter: Background |
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 2 3 4 5 6 7 8 9 10 11 12 |
dw1.Object.oval_1.Background.Color = RGB(255, 0, 128) ls_data = dw1.Describe("oval_1.Background.Color") dw1.Modify("emp_name.Background.Color='11665407'") ls_data = dw1.Describe("emp_name.Background.Mode") dw1.Modify("emp_name.Background.Mode='1'") dw1.Modify("rndrect_1.Background.Mode='0'") SQLCA.SyntaxFromSQL(sql_syntax, & "Style(...) Column(Background.Mode=1 ...) ...", & ls_Errors) SQLCA.SyntaxFromSQL(sql_syntax, & "Style(...) Column(Background.Color=11665407 ...)", & ls_Errors) |