This example shows the use of an xmMessageBox with custom pixmap face, which is taken from an external file:
#! /usr/sgitcl/bin/moat xtAppInitialize xmMessageBox .top managed \ -messageString {Hello world!} \ -symbolPixmap /usr/share/src/sgitcl/face . realizeWidget . mainLoop
Figure 4-13 : xmMessageBox With Pixmap A message box is a composite widget whose component children might be managed or unmanaged. Child widgets can be included or eliminated using the Tcl Motif commands manageChild and unmanageChild applied on the automatically-derived child widgets. With a message box named mw, these are the standard child widgets:
mw.Cancel mw.Help mw.Message mw.OK mw.Separator mw.SymbolThis example is like the xmMessageBox above, but without the Cancel and Help buttons and the separator line:
#! /usr/sgitcl/bin/moat xtAppInitialize xmMessageBox .mb managed -messageString {Hello world!} \ -symbolPixmap /usr/share/src/sgitcl/face foreach child {Cancel Help Separator} { .mb.$child unmanageChild } . realizeWidget . mainLoopTable 4-52 lists the resources associated with xmMessageBox.
Table 4-53 lists the callbacks associated with xmMessageBox.
Furthermore, xmMessageBox also inherits destroyCallback from the Core class.