Tk-YADialog
view release on metacpan or search on metacpan
lib/Tk/YADialog.pm view on Meta::CPAN
package Tk::YADialog;
=head1 NAME
Tk::YADialog - Yet another dialog
=cut
use strict;
use warnings;
use vars qw($VERSION);
$VERSION = '0.05';
use Tk;
use base qw(Tk::Derived Tk::Toplevel);
Construct Tk::Widget 'YADialog';
=head1 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;
}
=head1 DESCRIPTION
Provides a basic, less noisy, replacement for L<Tk::Dialog>.
Inherits L<Tk::Toplevel>.
=head1 CONFIG VARIABLES
=over 4
=item Switch: B<-buttons>
Default value ['Close'].
Specify a list of buttons to be shown.
Buttons can be specified in two ways:
=over 4
=item As a string
-buttons => ['Ok', 'Do not'],
=item As a list
-buttons => [
['Ok', $okcallback],
['Do not', $donotcallback],
]
You can specify the callbacks as standard Tk callbacks.
=back
=item Switch: B<-command>
Callback, is called when a button is pressed.
=item Switch: B<-defaultbutton>
Default value not defined.
Specify which button has the focus on popup.
=item Switch: B<-nowithdraw>
Default value 0.
When this value is set the dialog will not withdraw whatever you do.
( run in 1.325 second using v1.01-cache-2.11-cpan-302cb4679cc )