# Message Box widget

The Message Box widget is used for creating simple message dialogs. It is typically transient in nature, being displayed for the duration of a single transaction.

It is based on the Bulletin Board widget and is therefore similar in behavior.

The Message Box may be configured as one of a set of types: Error, Information, Message, Question, Warning, Working and Template. Template differs from the other types in that the Message Box does not display a standard built-in pixmap: it is assumed that you are going to customize the widget in some way from the normal Message Box. The Template type is new in Motif 1.2.

You may add child widgets to a Message Box in order to add some extra functionality of your own. The Message Box does make some layout assumptions based upon perceived purpose of the added children: extra buttons are displayed between the Ok and Apply built-in widgets, other widgets are displayed above the separator. The permissible number and type of added children is restricted in various ways by the Message Box; the capability of adding a MenuBar, Work Area and multiple PushButton children is new to Motif 1.2.

For more information, consult XmMessageBox(3X) in the OSF/Motif Programmer's Reference.

HINTS

The labels of the buttons may be changed from their defaults. It is best to change the labels using the Message Box resource panel, rather than altering the labels on the buttons directly.

If you want less than three buttons, the unwanted buttons may be hidden using the Managed toggle in the Core Resources Panel

The push buttons provided by the message box are gadgets and so will not highlight when selected.

See also:

- Bulletin Board widget
- Push Button widget
- Message Box resource panel
- Dialog Template widget
- Gadgets
- About WorkShop Visual