2.9.8 Status Bar

A status bar creates a separate area at the bottom of the window where messages are displayed. The status area can also contain other components, such as progress bars, (animated) pictures and edit boxes. You determine the relative position of the components in the status bar using the DisplayPosition and Message position properties.

You can display status and information messages in the status bar. The status messages appear and disappear as an operation progresses, whereas information messages are placed in a queue so that if there is more than one message, they can be scrolled through.

The easiest way of using a status bar is to run the VL_BBSTSBR template which places the status bar on the form and creates two subroutines: infmessage and stsmessage. The infmessage subroutine is used like this:

execute infmessage ('Processing Completed')

and the stsmessage subroutine syntax is:

execute stsmessage (LOOPS #LOOPCOUNT MESSAGE)

where LOOPS sets the number of loops after which the message is issued, #LOOPCOUNT is the number of the current loop and MESSAGE is the message text. The following code would issue a message 'nnnn Loops' in the status bar after every 1000 loops:

change #loopcount 0

begin_loop from(1) to(10000)

execute stsmessage (1000 #loopcount 'Loops')


Note that validation messages issued by I/O modules are displayed automatically if the form has a status bar.