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

Reorganizing controls in a DataWindow object – PB Docs 80 – PowerBuilder Library

Reorganizing controls in a DataWindow object – PB Docs 80

Reorganizing controls in a DataWindow object

This section describes the activities that help you change
the layout and appearance of the controls in a DataWindow object.

Displaying boundaries for controls in a DataWindow object

When reorganizing controls in the Design view, it is sometimes
helpful to see how large all the controls are. That way you can
easily check for overlapping controls and make sure that the spacing
around controls is what you want.

proc.gif To display control boundaries in a DataWindow object:

  1. Select Design>Options from the
    menu bar.

    The DataWindow Options dialog box displays.

  2. Select the Show Edges checkbox.

    PowerBuilder displays the boundaries of each control in the DataWindow object.

note.gif Boundaries display only in the Design view The boundaries displayed for controls are for use only in
the Design view. They do not display in a running DataWindow object or
in a printed report.

Using the grid and the ruler in a DataWindow object

The DataWindow painter provides a grid and a ruler to help you align
controls.

proc.gif To use the grid and the ruler:

  1. Select Design>Options from the
    menu bar.

    The DataWindow Options dialog box displays. The Alignment
    Grid box contains the alignment grid options.

  2. Use the options as needed:

    Option Meaning
    Snap to Grid Make controls snap to a grid position
    when you place them or move them
    Show Grid Show or hide the grid when the workspace
    displays
    X Specify the size (width) of the grid
    cells
    Y Specify the size (height) of the grid
    cells
    Show Ruler Show a ruler. The ruler uses the units
    of measurement specified in the Style dialog boxSee “Changing the DataWindow object style”

Your choices for the grid and the ruler are saved and used
the next time you start PowerBuilder.

Deleting controls in a DataWindow object

proc.gif To delete controls in a DataWindow object:

  1. Select the controls you want to delete.

  2. Select Edit>Delete from the menu bar.

Moving controls in a DataWindow object

In all presentation styles except Grid

In all presentation styles except Grid, you can move all the
controls (such as headings, labels, columns, graphs, and drawing
controls) anywhere you want.

proc.gif To move controls in a DataWindow object:

  1. Select the controls you want to move.

  2. Do one of the following:

    • Drag the controls with the mouse.
    • Press an arrow key to move the controls in one direction.

In grid DataWindow objects

You can reorder columns in a grid DataWindow object during execution.

See “Working in a grid DataWindow object”.

Copying controls in a DataWindow object

You can copy controls within a DataWindow object and to other DataWindow objects.
All properties of the controls are copied.

proc.gif To copy a control in a DataWindow object:

  1. Select the control.

  2. Select Edit>Copy from the menu bar.

    The control is copied to a private PowerBuilder clipboard.

  3. Copy (paste) the control to the same DataWindow object or
    to another one:

    • To copy the
      control within the same DataWindow object, select Edit>Paste from
      the menu bar.
    • To copy the control to another DataWindow object, open
      the desired DataWindow object and paste the control.

    PowerBuilder pastes the control at the same location as in the
    source DataWindow object (if you are pasting into the same DataWindow object, you
    should move the pasted control so it doesn’t cover the
    original control). PowerBuilder displays a message box if the control
    you are pasting is not valid in the destination DataWindow object.

Resizing controls in a DataWindow object

You can resize a control using the mouse or the keyboard.

Using the mouse

To resize a control using the mouse, select it, then grab
an edge and drag it with the mouse.

Using the keyboard

To resize a control using the keyboard, select it and then
do the following:

To make the control Press
Wider shift+right arrow
Narrower shift+left arrow
Taller shift+down arrow
Shorter shift+up arrow

In grid DataWindow objects

You can resize columns in grid DataWindow objects.

proc.gif To resize a column in a grid DataWindow object:

  1. Position the mouse pointer at a column
    boundary.

    The pointer changes to a 2-headed arrow.

  2. Press and hold the left mouse button and drag
    the mouse to move the boundary.

  3. Release the mouse button when the column is the
    correct width.

Aligning controls in a DataWindow object

Often you want to align several controls or make them all
the same size. You can use the grid to align the controls or you
can have PowerBuilder align them for you.

proc.gif To align controls in a DataWindow object:

  1. Select the control whose position you want
    to use to align the others.

    PowerBuilder displays handles around the selected control.

  2. Extend the selection by pressing and holding the ctrl key
    and clicking the controls you want to align with the first one.

    All the controls have handles on them.

  3. Select Format>Align from the menu bar.

  4. From the cascading menu, select the dimension
    along which you want to align the controls.

    For example, to align the controls along the left side, select
    the first choice on the cascading menu.

    PowerBuilder moves all the selected controls to align with the
    first one.

Equalizing the space between controls in a DataWindow object

If you have a series of controls and the spacing is fine between
two of them but the spacing is wrong for the rest, you can easily
equalize the spacing around all the controls.

proc.gif To equalize the space between controls in a DataWindow object:

  1. Select the two controls whose spacing is
    correct.

    To do so, click one control, then press ctrl and
    click the second control.

  2. Select the other controls whose spacing you want
    to be the same as the first two controls by pressing ctrl and
    clicking.

  3. Select Format>Space from the menu bar.

  4. From the cascading menu, select the dimension
    whose spacing you want to equalize.

Equalizing the size of controls in a DataWindow object

Say you have several controls in a DataWindow object and want their
sizes to be the same. You can accomplish this manually or by using
the Format menu.

proc.gif To equalize the size of controls in a DataWindow object:

  1. Select the control whose size is correct.

  2. Select the other controls whose size you want
    to match the first control by pressing ctrl and
    clicking.

  3. Select Format>Size from the menu bar.

  4. From the cascading menu, select the dimension
    whose size you want to equalize.

Sliding controls to remove blank space in a DataWindow object

You can specify that you want to eliminate blank lines or
spaces in a DataWindow object by sliding columns and other controls to
the left or up if there is blank space. You can use this feature
to remove blank lines in mailing labels or to remove extra spaces
between fields (such as first and last name).

note.gif Slide is used by default in nested reports PowerBuilder uses slide options automatically when you nest
a report to ensure that the reports are positioned properly.

proc.gif To use sliding columns or controls in a DataWindow object:

  1. Select Properties from the control’s
    popup menu and then select the Position tab in the Properties view.

  2. Select the Slide options you want:

    Option Description
    Slide Left Slide the column or control to the left
    if there is nothing to the left. Be sure the control does not overlap
    the control to the left. Sliding left will not work if the controls
    overlap
    Slide Up – All Above Slide the column or control up if there
    is nothing in the row above (the row above must be completely empty for
    the column or control to slide up)
    Slide Up – Directly Above Slide the column or control up if there
    is nothing directly above it
    in the row above

note.gif If you are sliding columns up Even blank columns have height; if you want columns to slide
up, you need to specify as Autosize Height all columns above that
might be blank and that you want to slide other columns up through.

Example

In a mailing label that includes first and last names, as
well as address information, you can use sliding to combine the
columns appropriately.

In the following label, emp_lname, the comma, state,
and zip_code are specified as slide left. Edges are shown
to indicate the spacing between the columns. Notice that there is
a small amount of space between controls. This space is necessary
for Slide Left to work properly:

dwen27.gif

When you preview (run) the report, the last name, comma, state,
and zip code slide left to remove the blank space:

dwen28.gif


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