Choosing the window size and position

StepsTo resize a window in the Layout view:

  1. Drag the edge of the window in the Window painter’s Layout view.

Resizing a window is easiest using the Layout view, but you can also change the window’s width and height properties in the Properties view.

StepsTo specify a window’s position and size:

  1. Click the window’s background so the Properties view displays window properties.

  2. Select the Other tab.

  3. Enter values for x and y locations in PowerBuilder units.

  4. Enter values for width and height in PowerBuilder units.

    The size of the window changes in the Layout view.

  5. To see the position of the window, click the Preview button in the PainterBar (not the Preview button on the PowerBar).

  6. To return to PowerBuilder, close the window.

    For information about preview, see “Viewing your work”.

About PowerBuilder units

All window measurements are in PowerBuilder units (PBUs). Using these units, you can build applications that look similar on different resolution screens. A PBU is defined in terms of logical inches. The size of a logical inch is defined by your operating system as a specific number of pixels. The number is dependent on the display device. Windows typically uses 96 pixels per logical inch for small fonts and 120 pixels per logical inch for large fonts.

Almost all sizes in the Window painter and in scripts are expressed as PowerBuilder units. The two exceptions are text size, which is expressed in points, and grid size in the Window and DataWindow painters, which is in pixels.

For more about PowerBuilder units, see the PowerScript Reference.