http://qs321.pair.com?node_id=255939


in reply to How to bring a Tk window to the top

If the toplevel hasn't been mapped yet or has been withdrawn you'll want to invoke the deiconfiy method to make sure the window is mapped in de-iconified form, and then the raise method to bring the window to the top of the stacking order. The Tk::Widget and Tk::Wm man pages should be helpful.

This quickie demo should give you a good start:

use Tk; $mw = tkinit; $t = $mw->Toplevel; $t->withdraw; $t->Label(-text => "Testing...")->pack; $t->Button( -text => "Withdraw", -command => sub {$t->withdraw}, )->pack; $mw->Button( -text => 'Test', -command => sub { $_->deiconify, $_->raise for $t; }, )->pack; MainLoop;