Color DataWindow object property
Description
The text color of the column or the background color of the
DataWindow.
The color affected by the Color property depends on the control:
-
For the DataWindow, Color specifies the background
color -
For columns, computed fields, and text, Color specifies
the text color -
For graphs, Color specifies the line color used
for axes, borders around data markers, tick marks, and the outline
of the box for 3D graphs
Controls
DataWindow, Button, Column, Graph, and GroupBox controls
Syntax
PowerBuilder dot notation:
1 |
<span> dw_control</span>.Object.DataWindow.Color |
1 |
<span>dw_control</span>.Object.<span>controlname</span>.Color |
Describe and Modify argument:
1 |
"DataWindow.Color { = <span>long</span><span></span> }" |
1 |
"<span>controlname</span><span>.</span>Color { = <span>long</span><span></span> }" |
DataWindowSyntaxFromSql:
1 |
DataWindow ( Color =<span> long</span> ) |
1 |
Column ( Color =<span> long</span> ) |
Parameter |
Description |
---|---|
controlname |
The column whose text color you want |
long |
(exp for columns When generating DataWindow syntax with DataWindowSyntaxFromSql, the Color |
Usage
In the painter
For the DataWindow background, click the DataWindow to deselect
all controls and set the value in the Properties view, Background
tab, Color option. If you save to an EMF or WMF, the properties
on the Background tab are not saved with the DataWindow.
For a column’s text color, select the column and
set the value in the Properties view, Font tab, Text Color option.
For a graph’s line color, select the graph and set
the value in the Properties view, General tab, Text Color option.
Examples
1 |
string column_text_color |
1 |
column_text_color = dw1.Object.emp_name.Color |
1 |
dw1.Object.salary.Color = & |
1 |
"0~tIf(salary>90000,255,65280)" |
1 |
dw_back_color = dw1.Describe("DataWindow.Color") |
1 |
column_text_color = dw1.Describe("emp_name.Color") |
1 |
dw1.Modify( & |
1 |
"salary.Color='0~tIf(salary>90000,255,65280)'") |