Displaying a message on the caption line
caption |
Display a message on the caption line |
SYNTAX
caption text_expression [pen = pen_no] [in window_id]
Displays a text expression on the caption (bottom) line of a window.
text_expression |
The text to be displayed. It may be
a string constant, an alphanumeric
field, or a concatenation of several
such items using the operators / and
+. If the value of a numeric field
is required in a message, it must
first be assigned to an alphanumeric
field. |
[pen = pen_no] |
If present, this clause specifies a
pen from the window palette
to be used for the display of the
caption. The pen number may be an
integer or manifest constant
redefinition representing the number
of the pen required. The default pen
for the display of captions is
PEN_CAPTION (32). |
[in window_id] |
If the in window_id clause is
present the specified window is used
If the in window_id clause is
absent, the task window
is used.
|
Clearing a caption
Captions are automatically cleared by any of the following
circumstances:
1 |
Another caption is displayed in the
window. This may be another caption
issued by the caption command,
or may be a help caption attached to
a window control by a caption =
clause. |
2 |
A menu option gains focus while
sys.MenuCaption
is ON. This clears the existing
caption even if the option has no
help caption defined. |
3 |
A window control other than a menu
option gains focus while
sys.Captions
is ON. This clears the existing
caption even if the control has no
help caption defined. |
4 |
The clear[all]
command is executed. |
In order to explicitly clear a caption, use the command:
NOTES
The style flag WS_CAPTION can
be used with a top-level window to give the window a caption bar when it
is first created. If the flag is not used, the bar is created the first
time it is needed.
The related info command displays messages in a standard
window specially opened for the purpose.
The put command can be used to display text in a part of
the window other than the caption line.
EXAMPLE
caption "Please wait while updates are completed..." in Window4
caption ""
caption "Doesn't this caption leap out at you!" pen = PEN_BOLD in Win3