| 1 |
|
| 2 |
=head1 NAME |
| 3 |
|
| 4 |
Tk::MsgBox - create and manipulate a message dialog |
| 5 |
|
| 6 |
=for pm Tk/MsgBox.pm |
| 7 |
|
| 8 |
=for category Popups and Dialogs |
| 9 |
|
| 10 |
=head1 SYNOPSIS |
| 11 |
|
| 12 |
use Tk::MsgBox |
| 13 |
... |
| 14 |
$d = $top->MsgBox(-title => "Title", -type => "okcancel"); |
| 15 |
... |
| 16 |
$button = $d->Show; |
| 17 |
|
| 18 |
=head1 DESCRIPTION |
| 19 |
|
| 20 |
B<MsgBox> is a simple dialog with predefined buttons. |
| 21 |
|
| 22 |
=head1 OPTIONS |
| 23 |
|
| 24 |
The options recognized by B<MsgBox> are as follows: |
| 25 |
|
| 26 |
=over 4 |
| 27 |
|
| 28 |
=item B<-icon> |
| 29 |
|
| 30 |
Specify the icon of the MsgBox. Valid values are B<error>, B<info>, |
| 31 |
B<question>, or B<warning>. |
| 32 |
|
| 33 |
=item B<-type> |
| 34 |
|
| 35 |
Specify the type of the MsgBox. Valid values are B<abortretryignore>, |
| 36 |
B<ok>, B<okcancel>, B<retrycancel>, B<yesno>, or B<yesnocancel>. The |
| 37 |
type determines the buttons to be shown. |
| 38 |
|
| 39 |
=item B<-default> |
| 40 |
|
| 41 |
Specify the default button. This must be one of B<abort>, B<retry>, |
| 42 |
B<ignore>, B<ok>, B<cancel>, B<yes>, or B<no>, depending on the type |
| 43 |
of the MsgBox previously specified. |
| 44 |
|
| 45 |
=item B<-detail> |
| 46 |
|
| 47 |
Specify text for the detail region of the MsgBox. |
| 48 |
|
| 49 |
=item B<-message> |
| 50 |
|
| 51 |
Specify the message text of the MsgBox. |
| 52 |
|
| 53 |
=item B<-title> |
| 54 |
|
| 55 |
Specify the title of the MsgBox. |
| 56 |
|
| 57 |
=back |
| 58 |
|
| 59 |
=head1 METHODS |
| 60 |
|
| 61 |
B<MsgBox> supports only one method as of now: |
| 62 |
|
| 63 |
=over 4 |
| 64 |
|
| 65 |
=item B<Show()> |
| 66 |
|
| 67 |
Displays the MsgBox until the user invokes one of the buttons. Returns |
| 68 |
the name of the button invoked. |
| 69 |
|
| 70 |
=back |
| 71 |
|
| 72 |
=head1 AUTHOR |
| 73 |
|
| 74 |
Translated from Tcl/Tk by B<Slaven Rezic> [email protected] |
| 75 |
|
| 76 |
This code is distributed under the same terms as Perl. |
| 77 |
|
| 78 |
=head1 SEE ALSO |
| 79 |
|
| 80 |
L<Tk::messageBox>, L<Tk::DialogBox>, L<Tk::Dialog>. |
| 81 |
|
| 82 |
=cut |
| 83 |
|