Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

More examples in the DataWindow painter and in code – PB Docs 2019 – PowerBuilder Library

More examples in the DataWindow painter and in code – PB Docs 2019

More examples in the DataWindow painter and in code

These examples illustrate the difference between the format for
a DataWindow expression specified in the DataWindow painter versus in
code.

Border property

The expression applied to the Border property of the
salary_plus_benefits column displays a border around salaries over
$60,000:

This statement changes the expression in code:

Font.Weight property for a
column

To make out-of-state (not in Massachusetts) names and numbers
bold in a phone list, apply this expression to the name and
phone_number columns. The state column must be part of the data
source, but it does not have to be displayed:

This statement changes the expression in code:

Brush.Color property for a
rectangle

This expression, applied to a rectangle drawn around all the
columns in a tabular report, causes alternate rows to be shaded (a
graybar effect). Make sure the columns and computed fields have a
transparent background. The expression Mod(GetRow( ), 2) = 1
distinguishes odd rows from even rows:

This statement changes the expression in code:

Brush.Color and Brush.Hatch properties for
a rectangle

To highlight employees whose review date is approaching, draw a
rectangle behind the row. This expression for the rectangle’s
Brush.Color property makes the rectangle light gray for employees for
whom the month of the start date matches the current month or the next
month:

A similar expression for the Brush.Hatch property makes the fill
pattern of the rectangle Bdiagonal (1) for review dates that are
approaching. Otherwise, the rectangle is transparent (7) so that it
does not show:

You can also set the Pen.Color and Pen.Style properties to
affect the outline of the rectangle.

If you wanted to change the Brush.Color property in code instead
of setting it in the painter, the code would look like this:

Font.Height property for a
rectangle

This expression applied to the Font.Height property of a text
control makes the text control in the first row of a DataWindow larger
than it appears in other rows. Make sure the borders of the text
control are large enough to accommodate the increased size:

This statement changes the expression for the text control
t_desc in code:

For more information

For more information about DataWindow expressions, see DataWindow Operators and
Expressions


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