Holly3g has asked for the wisdom of the Perl Monks concerning the following question:
Hi!
I was just wondering if anyone knew how of window management options for the perl Tk module WaitBox. (It can be found on cpan at http://search.cpan.org/~bpowers/Tk-WaitBox-1.3/WaitBox.pm .)
As it is now, the wait box pops up in the middle of my screen, but I'd like it in the bottom center. Any suggestions??
Thanks!
Assuming your Tk::WaitBox is a toplevel widget (which it probably is)....
my $screenheight = $mw->screenheight;
my $screenwidth = $mw->screenwidth;
# Force it on the screen and to take a size if it
# hasn't already
$waitbox->update();
my $wbwidth = $waitbox->width();
my $wbheight = $waitbox->height();
my $x = ($screenwidth - $wbwidth) / 2;
my $y = $screenheight - $wbheight;
$waitbox->geometry("+$x+$y");