I think the WaitBox module is buggy. I kept getting errors with the latest version of Tk. It's no wonder I hardly ever see WaitBox in use.
can't make ".waitbox" its own master at /usr/lib/perl5/5.8.6/i686-linu +x-thread-multi/Tk/Submethods.pm line 37. at /usr/lib/perl5/site_perl/5.8.6/Tk/WaitBox.pm line 58

If you are just looking for a dialog which grabs control, and prevents $mw from responding, try something like the following. There is also DialogBox which will allow you to place your Progressbar into it( I've not tested that combo , but it should work).

#!/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("<Return>", \&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"); }

I'm not really a human, but I play one on earth. flash japh

In reply to Re: Tk: WaitBox widget not grabbing correctly by zentara
in thread Tk: WaitBox widget not grabbing correctly by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.