wb_set_size

bool wb_set_size (int wbobject, mixed width [, int height])

Sizes the object wbobject to width and height pixels. Parameters width and height may be used as follows:

width

height

Applies to

What it does

Positive integer

Positive integer

window or control

Sets the window or control size to width and height pixels.

WBC_NORMAL

(not supplied)

window

Restores the window, if it is not already.

WBC_MINIMIZED

(not supplied)

window

Minimizes the window, if it is not already.

WBC_MAXIMIZED

(not supplied)

window

Maximizes the window, if it is not already.

Array of integers

(not supplied)

ListView

Changes the column widths of the control.

Returns TRUE on success or FALSE if an error occurs.

Examples

// Set the size of a control

wb_set_size($ctrl, 120, 30);

// Maximize a window

wb_set_size($win, WBC_MAXIMIZED);

// Set the column widths of a treeview.
// First column is set to 100 pixels, second is left alone, third is set to default.

wb_set_size($list, array(100, null, -1));

See also

wb_get_size
wb_set_position
Control functions
Window functions
ListView class