Message style attributes

Message style presentation attributes apply to an error or message.

The element type for both ERROR and MESSAGE is Message. To distinguish ERROR from MESSAGE, the ":error" or ":message" pseudo-selectors can be used to specify a different style for the rendereing of each instruction: "Message:error" corresponds to the ERROR instruction, and "Message:message" corresponds to the MESSAGE instruction.

The ERROR and MESSAGE instructions can get a STYLE attribute in the ATTRIBUTES clause, to specify a particular style name:

MESSAGE "No rows have been found." ATTRIBUTES(STYLE="info")

A limited set of common style attributes are supported for error/message display. In addition to the attributes described in the section, you can only define font style attributes for messages.

Like simple form fields, TTY attributes have a higher priority than style attributes. By default, ERROR has the TTY attribute REVERSE, which explains why ERROR messages have a reverse background, even when you use a backgroundColor style attribute. Use the NORMAL attribute in ERROR, to avoid the default REVERSE TTY attribute and define your own background color with a style.

Consider centralizing your ERROR and MESSAGE instruction calls in a function, to simplify global modifications:

FUNCTION my_error(m, s)
   DEFINE m, s STRING
   IF s IS NULL THEN
       ERROR m ATTRIBUTES(NORMAL)
   ELSE
       ERROR m ATTRIBUTES(NORMAL, STYLE=s)
   END IF
END FUNCTION

This table shows the presentation attributes for ERROR and MESSAGE instructions:

Table 1. Presentation attributes for ERROR and MESSAGE instructions
Attribute GDC GWC-JS GMA GMI
position

Defines the output type of the status bar message field.

Values can be:
  • "statusbar" (default): will display the text in the regular statusbar of the window.
  • "popup": will bring a window popup to the front; it should be used with care, since it can annoy the user.
  • "statustip": will add a small "down" arrow button that will show the popup once the user clicks on it. This can be useful to display very long text.
  • "both": will display the text in a popup window and then in the status bar.
Yes No No No
textFormat

Defines the rendering of the content of the widget.

Possible values are:
  • "plain" (default): the value assigned to this widget is interpreted as plain text.
  • "html", it is interpreted as HTML (with hyper-links).
Yes No No No