# dialog.message

Shows a message box

Usage

    dialog.message [-b] (<caption>,<message_text>,<icon>,<button0>[,<button1>[,<button2>[,<magic1>[,<magic2>[...]]]]])
    {
        <callback_command>
    }

Description

Shows a message dialog box with the specified <caption> , <message_text> , <icon> and buttons.
<caption> is a text string that will appear in the caption of the dialog box.
<message_text> is a text string that will appear in the dialog box and can contain HTML formatting.
<icon> is an image identifier that defines an icon to be placed in the dialog box. <icon> can be a relative or absolute path to an image file , a signed number (in that case it defines an internal KVIrc image) or one of the special strings "critical", "information" and "warning".
<button0> is the text of the first button (on the left).
<button1> is the text of the second button (if empty or not given at all, only one button will appear in the dialog).
<button2> is the text of the third button (if empty or not given, only two buttons will appear in the dialog).
The first button is always the default button: it is activated when the user presses the enter key. The thirs, or the second if the third is not present, is the escape button and is activated when the user presses the Esc key.
<magic1>,<magic2>... are the magic parameters: evaluated at dialog.message call time and passed to the <callback_command> as positional parameters.
If the -b or -modal switch is specified the dialog will have non-blocking modal behaviour: it will appear above its parent widget and block its input until it's closed.
Once the dialog has been shown , the user will click one of the buttons. At this point the dialog is hidden and the <callback_command> is executed passing the number of the button clicked as $0 and the magic parameters as positional parameters $1 , $2 , $3....
Please note that if the user closes the window with the window manager close button , the action is interpreted as a button2 click (that is usually sth as "Cancel").

Syntax Specification

    dialog.message [-b] (<caption>,<message_text>,<icon>,<button0>[,<button1>[,<button2>[,<magic1>[,<magic2>[...]]]]])
    {
        <callback_command>
    }

Examples

    # Just a warning dialog
    dialog.message("Warning","You're being <b>warned</b>",warning,"Ok"){ echo The user clicked OK; }
    # A question
    dialog.message("And now ?","What do you want to do ?",information,"Go home","Watch TV","Scream")
    {
        if($0 == 0)echo "The user want's to go home"
        else if($0 == 1)echo "The user want's to watch TV"
        else echo "The user wants to scream!"
    }

Index, Commands

KVIrc 4.0.2.4740 Documentation
Generated by root at Tue Feb 1 06:16:04 2011