in reply to Re: How do I move a top level window in Tk?
in thread How do I move a top level window in Tk?

reopen a dialog?
#!/usr/bin/perl -- use strict; use warnings; use Tk; my $mw = tkinit; $mw->Button( -text => "Button", -command => sub { my $d = $mw->Dialog( -title => "Title", -buttons => [ "OK", "Cance +l" ] ); $d->geometry('200x200+40+40'); warn 'Show ', $d->Show; $d->destroy; undef $d; }, )->pack; $mw->MainLoop; __END__

Replies are listed 'Best First'.
Re^3: How do I move a top level window in Tk?
by paulchernoch (Acolyte) on May 18, 2009 at 21:08 UTC
    Your suggestion is a good one. I have recently been programming in Flash ActionScript and the paradigm is to create a dialog in one place, then open it when needed, close it without disposing, and reopen on subsequent use. When you reopen a dialog, the state is the same as when the user last had it open, which is useful for some dialogs - hence the approach. But in my case, I could have disposed it after all. - Paul