1messageBox(3) User Contributed Perl Documentation messageBox(3)
2
3
4
6 Tk::messageBox - pop up a message window and wait for user response.
7
9 $response = $widget->messageBox(-option => value, ... );
10
12 This method uses Tk::Dialog to quickly create several common dialog
13 boxes. A dialog widget consists of a message, an icon and a set of
14 buttons (see the -type option). After the message window is popped up,
15 messageBox waits for the user to select one of the buttons and return
16 the button text (note that it's best to check the returned value in a
17 case insensitive manner). NOTE: unlike Tk::Dialog which creates its
18 widget once and can be used many times, the messageBox window is
19 created every time it's used.
20
21 The following option/value pairs are supported:
22
23 -default
24 The case-sensitive symbolic name of the default button for this
25 message window ('Ok', 'Cancel' and so on). See -type for a
26 list of the symbolic names. If the message box has just one
27 button it will automatically be made the default, otherwise
28 if this option is not specified, there won't be any default
29 button.
30
31 -icon
32 Specifies an icon to display. On X11 any of the builtin Tk bitmaps
33 can specified. On Windows only error, info, question or warning are
34 supported.
35
36 -message
37 Specifies the message to display.
38
39 -title
40 Specifies a string to display as the title.
41
42 -type
43 Specifies a predefined set of buttons to be displayed. The
44 following values are possible: 'AbortRetryIgnore', 'Ok',
45 'OkCancel', 'RetryCancel', 'YesNo' or 'YesNoCancel'.
46
48 $response = $mw->messageBox(-icon => 'question', -message => 'Hello
49 World!', -title => 'My title', -type => 'AbortRetryIgnore', -default =>
50 'Retry');
51
53 Stephen.O.Lidie@Lehigh.EDU. 98/05/25
54
55
56
57perl v5.28.0 2018-07-15 messageBox(3)