What you can do with DataWindow object properties
The DataWindow object defines the way data is displayed in
a DataWindow control. It contains controls that represent the columns,
text labels, computed fields, and images.
The properties of the DataWindow object and its controls store
the information that specifies the behavior of the DataWindow object.
They are not properties of the DataWindow control, but of the DataWindow
object displayed in the control.
Terminology
When you are programming for DataWindows, there are several
types of expressions involved.
A DataWindow expression is an expression
assigned as a value to a DataWindow property and is evaluated by
the DataWindow engine. The expression can refer to column data and
can have a different value for each row in the DataWindow.
A DataWindow property expression is
an expression in your code that gets or sets the value of a DataWindow
property. Its effects are equivalent to what the Describe and Modify methods
do.
A DataWindow data expression is an
expression in your code that gets or sets data in the DataWindow.
Its effects are similar to what the SetItem and
several GetItem methods do.
Types of values
Property values can be constants or can be DataWindow expressions. DataWindow
expressions allow the property value to be based on other conditions
in the DataWindow, including data values. Conditional expressions based
on data can give the property a different value for each row.
Getting and setting values
You establish initial values for properties in the DataWindow
painter. You can also get and set property values at runtime in
code.
There are several techniques for accessing property values.
A particular property might be accessible by a subset of those techniques.
For example, some properties are read-only at runtime, some can
be set only at execution, and some accept only constants (not DataWindow
expressions) as values.
For a complete list of properties and the
ways you can access each one, see Chapter 3, “DataWindow Object Properties.”
Examples: ways of setting the Border property
This table lists the ways you can access a property, using
the Border property as an example:
|
What you can |
How to do it, using the Border property |
What happens |
|---|---|---|
|
Set the initial value of the property |
Property sheet, General tab, Border box |
The Border property takes on the value |
|
Specify the value of the property at runtime |
Property sheet, General tab, Border box, |
In Preview and at runtime, the border changes For example, an expression can give the Salary column value To see the effect in the Preview view, you might need to close |
|
Get the value of the property at runtime in |
Property expression for the Border property or Describe method |
Both the expression and the Describe method |
|
Change the value of the property at runtime |
Property expression for the Border property or Modify method |
At runtime, the value of the property changes |
|
Set the initial value of the property |
SyntaxFromSQL method |
When SyntaxFromSQL executes, PowerBuilder SyntaxFromSQL is a |