Dialog(3pm) | User Contributed Perl Documentation | Dialog(3pm) |
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:
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:
$dialog = $mw->Dialog(-text => 'Save File?', -bitmap => 'question', -title => 'Save File Dialog', -default_button => 'Yes', -buttons => [qw/Yes No Cancel/);
bitmap, dialog, modal, messageBox
2023-03-23 | perl v5.36.0 |