Accessing the properties of a DataWindow object – PB Docs 126

Accessing the properties of a DataWindow object

About DataWindow object properties

DataWindow object properties store the information that controls
the behavior of a DataWindow object. They are not properties of
the DataWindow control, but of the DataWindow object displayed in
the control. The DataWindow object
is itself made up of individual controls—column, text,
graph, and drawing controls—that have DataWindow object
properties.

You establish initial values for DataWindow object properties
in the DataWindow painter. You can also get and set property values
during execution in your code.

You can access the properties of a DataWindow object by using
the Describe and Modify methods or DataWindow property expressions.
Which you use depends on the type of error checking you want to
provide and on whether you know the names of the controls within
the DataWindow object and properties you want to access when the
script is compiled.

Note that in the Web ActiveX, only the Describe and Modify
methods (not property expressions) are supported.

For guidelines on deciding which method to
use and for lists and descriptions of DataWindow object properties,
see the DataWindow Reference.

Using methods to access object properties

You can use the following methods to work with the properties
of a DataWindow object:

  • Describe—Reports
    the values of properties of a DataWindow object and controls within
    the DataWindow object

  • Modify—Modifies a DataWindow object by
    specifying a list of instructions that change the DataWindow object’s
    definition

PowerBuilder

For example, the following statements assign the value of
the Border property for the empname column to a string variable:

The following statement changes the value of the Border property
for the empname column to 1:

Web ActiveX

The JavaScript code is nearly identical to PowerScript. These statements
get the value of the Border property for the empname column:

The following statement changes the value of the Border property
for the empname column to 1:

note.png About dynamic DataWindow objects

Using Describe and Modify, you can provide an interface through
which application users can alter the DataWindow object during execution.
For example, you can change the appearance of a DataWindow object
or allow an application user to create ad hoc reports. For more
information, see Chapter 3, “Dynamically Changing DataWindow
Objects .”

Using expressions

DataWindow property expressions provide access to properties
with fewer nested strings. In PowerBuilder, you can handle problems
with incorrect object and property names in the Error event:

PowerBuilder

Use the Object property and dot notation. For example:

For reference material on the available variations
for property expressions, see the DataWindow Reference.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x