Tk::MsgBox(3pm)

Tk::MsgBox3pm

Create and manipulate a message dialog

Usage

    use Tk::MsgBox
    ...
    $d = $top->MsgBox(-title => "Title", -type => "okcancel");
    ...
    $button = $d->Show;

Overview

MsgBox is a simple dialog with predefined buttons.

Options

The options recognized by MsgBox are as follows:

-icon

Specify the icon of the MsgBox. Valid values are error, info, question, or warning.

-type

Specify the type of the MsgBox. Valid values are abortretryignore, ok, okcancel, retrycancel, yesno, or yesnocancel. The type determines the buttons to be shown.

-default

Specify the default button. This must be one of abort, retry, ignore, ok, cancel, yes, or no, depending on the type of the MsgBox previously specified.

-detail

Specify text for the detail region of the MsgBox.

-message

Specify the message text of the MsgBox.

-title

Specify the title of the MsgBox.

Methods

MsgBox supports only one method as of now:

Show()

Displays the MsgBox until the user invokes one of the buttons. Returns the name of the button invoked.

Releases

10 releases since Debian 5.0 (Lenny); the text changed 9 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11
  8. 12
  9. 13
  10. Arch

Author

Translated from Tcl/Tk by Slaven Rezic [email protected]

This code is distributed under the same terms as Perl.

From perl-tk 804.036-9 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.