.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "messageBox 3" .TH messageBox 3 2025-07-14 "perl v5.42.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Tk::messageBox \- pop up a message window and wait for user response. .SH SYNOPSIS .IX Header "SYNOPSIS" \ \ \ \ \fR\f(CI$response\fR\fI\fR = \fI\fR\f(CI$widget\fR\fI\fR\->\fBmessageBox\fR(\fI\-option\fR => \fIvalue\fR, ... ); .SH DESCRIPTION .IX Header "DESCRIPTION" This method uses Tk::Dialog to quickly create several common dialog boxes. A dialog widget consists of a message, an icon and a set of buttons (see the \fI\-type\fR option). After the message window is popped up, \fBmessageBox\fR waits for the user to select one of the buttons and return the button text (note that it\*(Aqs best to check the returned value in a case insensitive manner). NOTE: unlike \&\fBTk::Dialog\fR which creates its widget once and can be used many times, the \fBmessageBox\fR window is created every time it\*(Aqs used. .PP The following option/value pairs are supported: .IP \fB\-default\fR 4 .IX Item "-default" The case\-sensitive symbolic name of the default button for this message window (\*(AqOk\*(Aq, \*(AqCancel\*(Aq and so on). See \fB\-type\fR for a list of the symbolic names. If the message box has just one button it will automatically be made the default, otherwise if this option is not specified, there won\*(Aqt be any default button. .IP \fB\-icon\fR 4 .IX Item "-icon" Specifies an icon to display. On X11 any of the builtin Tk bitmaps can specified. On Windows only \fBerror\fR, \fBinfo\fR, \fBquestion\fR or \&\fBwarning\fR are supported. .IP \fB\-message\fR 4 .IX Item "-message" Specifies the message to display. .IP \fB\-title\fR 4 .IX Item "-title" Specifies a string to display as the title. .IP \fB\-type\fR 4 .IX Item "-type" Specifies a predefined set of buttons to be displayed. The following values are possible: \*(AqAbortRetryIgnore\*(Aq, \*(AqOk\*(Aq, \*(AqOkCancel\*(Aq, \&\*(AqRetryCancel\*(Aq, \*(AqYesNo\*(Aq or \*(AqYesNoCancel\*(Aq. .SH EXAMPLE .IX Header "EXAMPLE" \&\fR\f(CI$response\fR\fI\fR = \fI\fR\f(CI$mw\fR\fI\fR\->\fBmessageBox\fR(\-icon => \*(Aqquestion\*(Aq, \-message => \*(AqHello World!\*(Aq, \-title => \*(AqMy title\*(Aq, \-type => \*(AqAbortRetryIgnore\*(Aq, \-default => \*(AqRetry\*(Aq); .SH AUTHOR .IX Header "AUTHOR" Stephen.O.Lidie@Lehigh.EDU. 98/05/25