User Tools

Site Tools


status_set_status_bar_.htm
Navigation:  Language Reference > 9 -  Window and Report Attributes > Window and Report Attributes >====== STATUS (set status bar) ====== Previous pageReturn to chapter overviewNext page

NewC7.jpg

STATUS( [widths] )

blk2blue.jpg

STATUS Specifies the presence of a status bar.
Widths A list of integer constants (separated by commas) specifying the size of each zone in the status bar. If omitted, the status bar has one zone the width of the window.

The STATUS attribute (PROP:STATUS) specifies the presence of a status bar at the base of the APPLICATION or WINDOW. The status bar of an MDI WINDOW is always displayed at the bottom of the APPLICATION. A WINDOW without the MDI attribute displays its status bar at the base of the WINDOW. If the STATUS attribute is not present on the APPLICATION or WINDOW, there is no status bar.

The status bar may be divided into multiple zones specified by the widths parameters. The size of each zone is specified in dialog units. A negative value indicates the zone is expandable, but has a minimum width indicated by the parameter's absolute value. If no widths parameters are specified, a single expanding zone with no minimum width is created, which is equivalent to a STATUS(-1).

PROP:STATUS contains the widths of each status bar section in separate array elements. A zero (0) value is required in the last element to terminate the array.

The first zone of the status bar is always used to display MSG attributes. The MSG attribute string is displayed in the status bar as long as its control field still has input focus. A control or menu item without a MSG attribute causes the status bar to revert to its former state (either blank or displaying the text previously displayed in the zone).

Text may be placed in, or retrieved from, any zone of the status bar using runtime property assignment to PROP:StatusText. PROP:StatusText is an array containing the text of each section of the status bar. A zero (0) value is required in the last element to terminate the array. The text remains present until replaced.

Using the Status interfaces you can create styled Status bars that can have Zones of three kinds; Text, Image and Progess zones.

Example:

!An APPLICATION with a one-zone status bar:

MainWin APPLICATION,STATUS

       END

!A WINDOW with a two-zone status bar:

Win1 WINDOW,STATUS(160,160)

    END

CODE

OPEN(Win1)

Win1{PROP:STATUS,3} = 160                !Add a status bar zone

Win1{PROP:STATUS,4} = 0                  !and terminate the array

Win1{PROP:StatusText,3} = 'Hello Zone 3' !Put text in the new zone

See Also:

STATUS INTERFACES

MSG

status_set_status_bar_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1