Using the DWObject variable in PowerBuilder – PB Docs 126

Using the DWObject variable in PowerBuilder

A PowerBuilder DWObject object is an object that exists within
a DataWindow object. Each column, computed field, text control,
or drawing control is a DWObject.

A DWObject reference allows you to refer directly to controls
within a DataWindow.

You can use a DWObject variable to simplify DataWindow property
and data expressions. A DWObject variable takes the place of several
elements of the control’s dot notation.

The following syntaxes and examples show how using a DWObject
variable affects property and data expressions.

Property expressions

The simple syntax for a property expression is:

You can use a DWObject variable to refer to dwcontrolname.

If the code declares a DWObject variable and assigns the control
within the DataWindow to the variable, using syntax like this:

the syntax of the expression itself becomes:

For example, if the DataWindow had a column named empname,
a text control named t_emplabel, and a computed field named
cf_average, you could make the following assignments:

Data expressions

You can use a DWObject variable to refer to a column in a
data expression. For example, this syntax gets data for a single
row and column:

If the code declares a DWObject variable and assigns the control
within the DataWindow to the variable, using syntax like this:

The syntax of the expression itself becomes:


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