can't make ".waitbox" its own master at /usr/lib/perl5/5.8.6/i686-linux-thread-multi/Tk/Submethods.pm line 37. at /usr/lib/perl5/site_perl/5.8.6/Tk/WaitBox.pm line 58 #### #!/usr/bin/perl use warnings; use strict; use Tk; use Tk::Dialog; my $mw = MainWindow->new(); $mw->geometry("+100+100"); $mw->title("Main Window"); $mw->geometry("250x250"); $mw->bind("", \&do_dialog); my $result = "Dialog Result Here"; $mw->Label( -textvariable => \$result, -relief => "sunken", -borderwidth => 1 )->pack( -side => "bottom", -fill => "both", -padx => 5, -pady => 5, -ipadx => 3, -ipady => 3 ); $mw->Button( -text => "Exit", -command => sub{ exit(0) }, )->pack( -fill => "x", -padx => 5, -pady => 5, ); $mw->Button( -text => "Test Dialog", -command => \&do_dialog, )->pack( -expand => 1, -fill => "both", -padx => 5, -pady => 5, ); MainLoop; exit(0); sub do_dialog { my $dlg = $mw->Dialog( -title=>"Here is a question for you.", -buttons => ["Cancel", "No", "Yes"], -default_button => "No", -text => "Let's see what the result is..", -font => "Helvetica" ); $result = "Result: " . $dlg->Show(); print("got: $result\n"); }