Use this record-level keyword to specify the text, color, and display attributes for a title that will be imbedded within the top or bottom border of a window.
WDWTITLE([title-text] [title-text-color] [title-text-display-attribute] [*CENTER | *LEFT | *RIGHT] [*TOP | *BOTTOM])
At least one parameter must be specified.
The field-name specified must exist in the window record and must be defined as a character field with usage P.
The title-text-color specifies the color of the title text on a color display. The parameter is specified as an expression of the form (*COLOR value).
If the title-text-color parameter is not specified, it is set to the color of the border as default. The parameter is ignored if it is specified for a window on a noncolor display.
The title-text-display-attribute specifies the display attributes of the title text. The parameter is specified as an expression in the form (*DSPATR [value1 [value2 [value3...]]]). If more than one DSPATR is used, they are combined to form one DSPATR that is used for the title text.
If the title-text-display-attribute parameter is not specified, it is set to the text attribute of the border as default.
If neither the title-text-color nor title-text-display-attribute parameter is specified, the window border will flow up to the first character of the window title and resume immediately after the last character. If either parameter is specified, there will be a space immediately before and after the window title.
The *CENTER/*LEFT/*RIGHT parameter specifies whether the window title should be aligned to the CENTER, LEFT or RIGHT of the window border. If not specified, the window title will be aligned in the CENTER of the window border if the next parameter is *TOP or to the LEFT of the window border if the next parameter is *BOTTOM.
The *TOP/*BOTTOM parameter specifies if the text should be imbedded in the top or bottom border. If not specified, the text will be placed in the top border.
Option indicators are valid for this keyword.
The WDWTITLE keyword can only be specified on a record that contains a WINDOW keyword (in the definition format). If a WINDOW keyword that references another window is also specified, a warning message is issued.
You can specify more than one WDWTITLE on a record. If you specify the WDWTITLE keyword more than once at the record level, the parameters for the keywords that are in effect are combined. If different values are specified for the same parameter, the parameter value of the first keyword is used.
The following example shows how to specify the WDWTITLE keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A A R RECORD1 WINDOW(6 15 9 30) A N01 WDWTITLE((*TEXT &TTL1) (*COLOR GRN)) A 01 WDWTITLE((*TEXT &TTL1) (*COLOR RED)) A FIELD1 5A B 2 2 A FIELD2 20A B 8 5 A TTL1 10A P A A R RECORD2 WINDOW(8 20 9 30) A WDWTITLE((*TEXT &TTL2) + A (*COLOR YLW) + A (*DSPATR RI)) A FIELD3 5A B 2 2 A FIELD4 20A B 8 5 A TTL2 10A P A
If the window defined by RECORD1 is written to the display, it will have whatever text is contained within TTL1 imbedded within the top border of the window. If indicator 01 is set off, this text will be green. If indicator 01 is set on, the text will be red.
When the window defined by RECORD2 is written to the display, the text contained within TTL2 will be imbedded within the top border of the window. This text will be display in reverse image and yellow.