Resize

Description

Resizes an object or control by setting its Width and Height properties and then redraws the object.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control, DataStore object

Syntax

PowerBuilder

integer objectname.Resize (integer width, integer height ) 

Argument

Description

objectname

A reference to the object or control you want to resize

width

The new width in PowerBuilder units

height

The new height in PowerBuilder units

Returns

Returns 1 if it succeeds and –1 if an error occurs or if objectname is a minimized or maximized window.

Usage

You cannot use Resize for a child DataWindow.

NoteUse with other PowerBuilder objects and controls Resize does not resize a minimized or maximized sheet or window. If the window is minimized or maximized, Resize returns –1.

For use with other PowerBuilder controls, see Resize in the PowerScript Reference.

Examples

Example 1

This statement changes the Width and Height properties of gb_box1 and redraws gb_box1 with the new properties:

gb_box1.Resize(100, 150)

Example 2

This statement doubles the width and height of the picture control p_1:

p_1.Resize(p_1.Width*2, p_1.Height*2)