The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Tk::YADialog - Yet another dialog

SYNOPSIS

 require Tk::YADialog;
 my $dialog = $window->YADialog(
        -buttons => ['Ok, 'Close'],
 );
 my $e = $dialog->Entry->pack;
 my $but = $dial->Show;
 if ($but eq 'Ok') {
        $color = $e->Get;
 }

DESCRIPTION

Provides a basic, less noisy, replacement for Tk::Dialog. Inherits Tk::Toplevel.

CONFIG VARIABLES

Switch: -buttons

Default value ['Close']. Specify a list of buttons to be shown.

Switch: -command

Callback, is called when a button is pressed.

Switch: -defaultbutton

Default value not defined. Specify which button has the focus on popup.

Switch: -padding

Horizontal and vertical padding for the buttons. Default value 20.

Only available at create time.

METHODS

Switch: get

Returns the button that was pressed.

Switch: show

Pops up the dialog. you can provide options for the Popup method. See Tk::Popup. Show (capital S) also works for compatibility with Tk::Dialog.

LICENSE

Same as Perl.

AUTHOR

Hans Jeuken (hanje at cpan dot org)

BUGS

Unknown. If you find any, please contact the author.