Wiki Markup |
---|
{alias:qwarning} |
Name
qwarning — information dialog displaying a warning
...
The dialog may optionally have up to three buttons to replace the default OK button. The buttons are implicitly numbered 0, 1, 2. The command will return the number corresponding to the button pressed by the user.
Arguments
caption
Dialog title.
text
The main text of the dialog
button-x-text
Text to appear on button number x. There may be 1, 2, or 3 buttons provided in place of the default OK button.
Examples
Ex.1: Warning dialog
...
No Format | ||||
---|---|---|---|---|
| ||||
# A titled dialog with a message and OK button
qwarning Warning "This is a warning"
|
...
No Format | ||||
---|---|---|---|---|
| ||||
# Warning with title and buttons.
# Returns 0 (OK), 1 (Cancel), 2 (Details)
set button [qwarning "Open File" "Failed to open file" OK Cancel Details]
if { $button == 0 } {
# OK button was pressed
} elseif { $button == 1 } {
# Cancel buttons was pressed
} elseif { $button == 2 } {
# Details buttons was pressed
}
|
...