StatusBar class

The status bar is an optional horizontal bar that appears on the bottom of a parent window. To create a status bar, use the function wb_create_control() passing StatusBar as the parameter cclass.

If the parent of the status bar is a resizable window, the status bar is automatically given a sizing grip. When the parent window is resized, its width is adjusted automatically.

WinBinder supports multi-segment status bars. To create one, use wb_create_items(). Each item must be an array with a string (that may be empty) and a width. If the width is empty, NULL, zero or very small (up to 4) it will be automatically calculated to the width of the string plus a small margin, or a minimal width if the string is empty or NULL. If the last width is zero, NULL or empty it will extend the last segment to the right edge of the status bar independently of the text contents of the last segment.

For multi-segment status bars, parameter item in wb_set_text() will set the text of the specified segment (0 is default). For single-segment status bars, item is ignored.

Example

// Create the status bar

$statusbar = wb_create_control($mainwin, StatusBar, "Hello, I'm the status bar.");

// Create segments in status bar

wb_create_items($statusbar, array(
    array('This has 120 pixels', 120),
    array('', 20),
    array('Just enough for this text', null),         // NULL may be suppressed
    array('This one always extends to the end', null) // Here too

));

See also

wb_create_control
wb_create_items
wb_set_text
Control classes