STATUSBAR statement  

Purpose

Manipulate a STATUSBAR control.  A StatusBar is a horizontal window, typically at the bottom of a dialog client area, which displays various kinds of status information.  It can be divided into parts to display multiple items.

Syntax

STATUSBAR SET PARTS hDlg, id&, x& [,x&...]
STATUSBAR SET TEXT hDlg, id&, item&, style&, text$

hDlg

Handle of the dialog that owns the status bar.

id&

The control identifier assigned with CONTROL ADD STATUSBAR.

item&

Position of data on the STATUSBAR. First item=1, second=2...

style&

Style bits which specify the appearance of the status bar.

text$

A string expression passed as a parameter.

Remarks

In each of the following samples and descriptions, the STATUSBAR control which is the subject of the statement is identified by the handle of the dialog that owns the STATUSBAR (hDlg), and the unique control identifier you gave it upon creation in CONTROL ADD STATUSBAR.

The value item& refers to the position of the text data item on the STATUSBAR, and is always indexed to one.  The first string is position 1, the second is position 2, and so forth.

STATUSBAR SET PARTS hDlg, id&, x& [,x&...]

The STATUSBAR control is partitioned into as many as 32 sections, each of which can be used to display some particular status data to the user. The statement contains from 1 to 32 width parameters (x&), which specify the pixel or dialog unit size of that section.  You can use a very large number for the last parameter to signify that the section should extend all the way to the right side of the window.

STATUSBAR SET PARTS hDlg, id&, 50, 50, 9999

For example, the above statement would create a status bar with 2 sections of 50 pixels each, and a third section of the remaining width.

STATUSBAR SET TEXT hDlg, id&, item&, style&, text$

The text for the data item specified by item& is replaced with the new text in text$.  The value of item& = 1 for the first item, 2 for the second item, etc.  The status bar style value can be the default value of zero (0), or one of the other style values formed as a bitmask:

Zero (0) default

Text with a border to appear lower than the window.

%SBT_NOBORDERS

The text is drawn without any borders.

%SBT_POPOUT

Text with a border to appear higher than the window.

See also

Dynamic Dialog Tools, CONTROL ADD STATUSBAR, CONTROL SET FONT