Next: ClearListClearText Up: Procedures Previous: Procedures

## AlertBox, AlertBoxFd, AlertBoxFile

This template defines three new procedures named AlertBox, AlertBoxFd and AlertBoxFile. Calling one of these procedures pops up an alert box. These boxes can be modal or not. If the dialog box is modal, the procedure returns the number of the pressed button. Otherwise the specified command is evaluated. The procedures get the following parameters:

To configure the different aspects of the alert box, there exists a global array named alertBox. A default value of ``-'' means that the Tk default value is used. This array contains elements that control the alert box (color, font etc.):

A small example of an invocation may look like this:

``

    		set result [AlertBox ''This is an alert message!'' ''''

    				200x70 ''Dialog title'' OK Abort Cancel]

This would create the following dialog box:

Figure: The template AlertBox