Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

Tk::messageBox (3)

Name

Tk::messageBox - pop up a message window and wait for user response.

Synopsis

$response = $widget->messageBox(-option => value, ... );

Description

User Contributed Perl Documentation                              messageBox(3)



NAME
       Tk::messageBox  -  pop up a message window and wait for user response.

SYNOPSIS
       $response = $widget->messageBox(-option => value, ... );

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 -type option). After the message window is popped up,
       messageBox waits for the user to select one of the buttons and return
       the button text (note that it's best to check the returned value in a
       case insensitive manner). NOTE: unlike Tk::Dialog which creates its
       widget once and can be used many times, the messageBox window is
       created every time it's used.

       The following option/value pairs are supported:

       -default
           The case-sensitive symbolic name of the default button for this
           message window  ('Ok',  'Cancel'  and  so on).  See  -type  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't  be  any default
           button.

       -icon
           Specifies an icon to display. On X11 any of the builtin Tk bitmaps
           can specified. On Windows only error, info, question or warning are
           supported.

       -message
           Specifies the message to display.

       -title
           Specifies  a  string to display as the title.

       -type
           Specifies a predefined set of buttons to be displayed. The
           following values are possible: 'AbortRetryIgnore', 'Ok',
           'OkCancel', 'RetryCancel', 'YesNo' or 'YesNoCancel'.

EXAMPLE
       $response = $mw->messageBox(-icon => 'question', -message => 'Hello
       World!', -title => 'My title', -type => 'AbortRetryIgnore', -default =>
       'Retry');

AUTHOR
       Stephen.O.Lidie@Lehigh.EDU.  98/05/25



ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+----------------------------+
       |ATTRIBUTE TYPE |      ATTRIBUTE VALUE       |
       +---------------+----------------------------+
       |Availability   | library/perl-5/perl-tk-532 |
       +---------------+----------------------------+
       |Stability      | Volatile                   |
       +---------------+----------------------------+

NOTES
       Source code for open source software components in Oracle Solaris can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This software was built from source available at
       https://github.com/oracle/solaris-userland.  The original community
       source was downloaded from
       http://search.cpan.org/CPAN/authors/id/S/SR/SREZIC/Tk-804.036.tar.gz.

       Further information about this software can be found on the open source
       community website at http://search.cpan.org/~srezic/Tk.



perl v5.32.0                      2013-11-15                     messageBox(3)