GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Dialog(3) User Contributed Perl Documentation Dialog(3)

Tk::Dialog - Create modal dialog and wait for a response.

    $dialog = $parent ->Dialog(-option => value, ... );

This procedure is part of the Tk script library - its arguments describe a dialog box. After creating a dialog box, Dialog waits for the user to select one of the Buttons either by clicking on the Button with the mouse or by typing return to invoke the default Button (if any). Then it returns the text string of the selected Button.

While waiting for the user to respond, Dialog sets a local grab. This prevents the user from interacting with the application in any way except to invoke the dialog box. See the Show() method.

The following option/value pairs are supported:
-title
Text to appear in the window manager's title bar for the dialog.
-text
Message to appear in the top portion of the Dialog.
-bitmap
If non-empty, specifies a bitmap to display in the top portion of the Dialog, to the left of the text. If this is an empty string then no bitmap is displayed in the Dialog.
-default_button
Text label string of the Button that displays the default ring.
-buttons
A reference to a list of Button label strings. Each string specifies text to display in a Button, in order from left to right.

$answer = $dialog->Show(?-global?);
This method displays the Dialog, waits for the user's response, and stores the text string of the selected Button in $answer. If -global is specified a global (rather than local) grab is performed.

The actual Dialog is shown using the Popup method. Any other options supplied to Show are passed to Popup, and can be used to position the Dialog on the screen. Please read Tk::Popup for details.

Because Tk::Dialog is a subclass of Tk::DialogBox it inherits all the advertised subwidgets of its superclass: e.g. "B_button-text", where 'button-text' is a Button's -text value. Additionally, Tk::Dialog advertises:
message
The dialog's Label widget containing the message text.
bitmap
The dialog's Label widget containing the bitmap image.

$dialog = $mw->Dialog(-text => 'Save File?', -bitmap => 'question', -title => 'Save File Dialog', -default_button => 'Yes', -buttons => [qw/Yes No Cancel/);

bitmap, dialog, modal, messageBox
2013-11-15 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.