## wb_set_area

bool wb_set_area (int window, type [, int x, int y, int width, int height])

Sets a specific area in a window. Possible values for type are:

type | What it does
--- | ---
`WBC_TITLE` | Sets the area used to drag a borderless window with the mouse.
WBC_MINSIZE | Sets the minimum window size in a resizable window. Parameters x and y are ignored. If width is zero, no minimum horizontal dimension is set; if height is zero, no minimum vertical dimension is set.
WBC_MAXSIZE | Sets the maximum window size in a resizable window. Parameters x and y are ignored. If width is zero, no maximum horizontal dimension is set; if height is zero, no maximum vertical dimension is set.

Returns `TRUE` on success or `FALSE` if an error occurs.

NOTE: all four parameters x, y, width and height must be supplied.

# Example

`define("WIDTH", 480); define("HEIGHT", 320); // Example 1: Create a window and set the area that can be dragged (title area) $win1 = wb_create_window(NULL, NakedWindow, APPNAME, WIDTH, HEIGHT); wb_set_area($win1, WBC_TITLE, 0, 0, WIDTH, 86); // Set title area` `// Example 2: create a window that can be resized vertically, but not horizontally` $win2 = wb_create_window(NULL, ResizableWindow, APPNAME `, WIDTH, HEIGHT); // Create window` wb_set_area($win2, WBC_MINSIZE, 0, 0, WIDTH, 400); `// Set minimum width and minimum height` wb_set_area($win2, WBC_MAXSIZE, 0, 0, WIDTH, 0); // `Set maximum width and no height limit`

# See also

wb_create_window
Window functions
Window classes