~ubuntu-branches/ubuntu/natty/perl-tk/natty

« back to all changes in this revision

Viewing changes to pod/messageBox.pod

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Zander
  • Date: 2004-03-14 13:54:44 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040314135444-prc09u2or4dbr3to
Tags: 1:800.025-2
Add xlibs-dev to Build-Depends:,
Closes: #237942

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 
11
11
=head1 DESCRIPTION
12
12
 
13
 
This method uses L<Tk::Dialog|Tk::Dialog> to quickly create several common dialog boxes.
14
 
A dialog widget consists of a message, an icon and a set of buttons (see
15
 
the I<-type> option).  After the message window is popped up,  B<messageBox>
16
 
waits  for the user to select one of the buttons and return the button text.
17
 
NOTE:  unlike B<Tk::Dialog> which creates its widget once and can be used
18
 
many times, the B<messageBox> window is created every time it's used.
 
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.
19
21
 
20
22
The following option/value pairs are supported:
21
23
 
24
26
=item B<-default>
25
27
 
26
28
The case-sensitive symbolic name of the default button
27
 
for this message window  ('OK',  'Cancel'  and  so
 
29
for this message window  ('Ok',  'Cancel'  and  so
28
30
on).  See  B<-type>  for a list of the symbolic names.
29
31
If the message box has  just  one  button  it  will
30
32
automatically  be  made  the  default, otherwise if
33
35
 
34
36
=item B<-icon>
35
37
 
36
 
Specifies an icon to display. Any of the builtin Tk bitmaps can
37
 
specified.
 
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.
38
41
 
39
42
=item B<-message>
40
43
 
46
49
 
47
50
=item B<-type>
48
51
 
49
 
Specifies a predefined set of buttons to be displayed. The following values are possible:
50
 
'AbortRetryIgnore', 'OK', 'OKCancel', 'RetryCancel', 'YesNo' or 'YesNoCancel'.
 
52
Specifies a predefined set of buttons to be displayed. The following
 
53
values are possible: 'AbortRetryIgnore', 'Ok', 'OkCancel',
 
54
'RetryCancel', 'YesNo' or 'YesNoCancel'.
51
55
 
52
56
=back
53
57
 
54
58
=head1 EXAMPLE
55
59
 
56
 
I<$repsonse> = I<$mw>-E<gt>B<messageBox>(-icon =E<gt> 'questhead', -message =E<gt> 'Hello World!', -title =E<gt> 'My title', -type =E<gt> 'AbortRetryIgnore', -default =E<gt> 'Retry');
 
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');
57
61
 
58
62
=head1 AUTHOR
59
63