Debian Codegraph @

pod/messageBox.pod

raw
1 =head1 NAME
2
3 Tk::messageBox - pop up a message window and wait for user response.
4
5 =for category Popups and Dialogs
6
7 =head1 SYNOPSIS
8
9 S< >I<$response> = I<$widget>-E<gt>B<messageBox>(I<-option> =E<gt> I<value>, ... );
10
11 =head1 DESCRIPTION
12
13 This method uses L<Tk::Dialog|Tk::Dialog> to quickly create several
14 common dialog boxes. A dialog widget consists of a message, an icon
15 and a set of buttons (see the I<-type> option). After the message
16 window is popped up, B<messageBox> waits for the user to select one of
17 the buttons and return the button text (note that it's best to check the
18 returned value in a case insensitive manner). NOTE: unlike
19 B<Tk::Dialog> which creates its widget once and can be used many
20 times, the B<messageBox> window is created every time it's used.
21
22 The following option/value pairs are supported:
23
24 =over 4
25
26 =item B<-default>
27
28 The case-sensitive symbolic name of the default button
29 for this message window ('Ok', 'Cancel' and so
30 on). See B<-type> for a list of the symbolic names.
31 If the message box has just one button it will
32 automatically be made the default, otherwise if
33 this option is not specified, there won't be any
34 default button.
35
36 =item B<-icon>
37
38 Specifies an icon to display. On X11 any of the builtin Tk bitmaps can
39 specified. On Windows only B<error>, B<info>, B<question> or
40 B<warning> are supported.
41
42 =item B<-message>
43
44 Specifies the message to display.
45
46 =item B<-title>
47
48 Specifies a string to display as the title.
49
50 =item B<-type>
51
52 Specifies a predefined set of buttons to be displayed. The following
53 values are possible: 'AbortRetryIgnore', 'Ok', 'OkCancel',
54 'RetryCancel', 'YesNo' or 'YesNoCancel'.
55
56 =back
57
58 =head1 EXAMPLE
59
60 I<$response> = I<$mw>-E<gt>B<messageBox>(-icon =E<gt> 'question', -message =E<gt> 'Hello World!', -title =E<gt> 'My title', -type =E<gt> 'AbortRetryIgnore', -default =E<gt> 'Retry');
61
62 =head1 AUTHOR
63
64 [email protected]. 98/05/25
65
66 =cut
67