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

Example 4: changing the size and location of controls – PB Docs 80 – PowerBuilder Library

Example 4: changing the size and location of controls – PB Docs 80

Example 4: changing the size and location of controls

The following DataWindow object shows a rectangle and a line that
change size and location if the current row contains data for a
customer from the state of New York. The City and State columns
also change location, but the discussion will focus on the rectangle
and the line. The process for the columns is analogous:

cond055.gif

In the Design view, the rectangle and line display in one
location (and with a single set of dimensions):

cond060.gif

To change properties of the rectangle and the line for rows
with the state column equal to New York, you would specify the following
If statement for every size or location property you wanted to change.
You would substitute the values appropriate to the property. All
of the values used in this example are in thousandths of inches,
the unit of measure used for the DataWindow object:

Changing properties of the rectangle

The width, height, and x coordinate properties of the rectangle
have the expressions shown in the following figure defined for them:

cond061a.gif

At execution time, the rectangle is one size and x location
if the state is NY, and another size and location if the state is
not NY. You may notice that the x values seem to be off by .25.
This is because the left margin is set to .25, which adds .25 to
each x value:

cond065.gif

Changing properties of the line

For the line, the Expressions property page has entries for
two sets of x1 and x2 coordinates of the line, which define two
different line lengths and x positions. It also has y1 and y2 coordinates,
which define the two different y positions of the line. Finally,
it has an entry for pen width, which defines two different pen widths:

cond070a.gif

At execution time, the line changes length, x and y position,
and pen width depending on whether the state for the current row
of information is NY.


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