Working with a Status Bar

#### Search Results

Search

# Working with a Status Bar

In a similar way as the dynamic information line, the status bar makes an event-driven application more user-friendly.

The programmer has two options to relate a dialog element to a status bar:

- use the dialog editor (most likely because it is the easiest way); and

- use Natural code to specify everything dynamically.

When you use the dialog editor, you will have to:

- Set the attribute `HAS-STATUS-BAR` to `TRUE` for the dialog by marking the Status Bar entry in the Dialog Attributes window. The `HAS-STATUS-BAR` attribute determines whether the status bar may be modified. If `HAS-STATUS-BAR` is false, but `HAS-DIL` is true, the status bar appears, but is only used as dynamic information line.

When you use Natural code, the above step may look like this:

    ...
    PERSDATA-DIALOG.HAS-STATUS-BAR := TRUE  /* Set HAS-STATUS-BAR To TRUE
    PERSADTA-DIALOG.STATUS-TEXT := 'HELLO'  /* Set the text to 'Hello'
    ...

Note
The `STATUS-TEXT` and the `DIL-TEXT` are displayed in the same area if the dialog has a status line and a text is displayed on the DIL.