in reply to Block Tk GUI while doing a process
Thank you for the suggestions! The GUI does remain reactive because I use $mw->update; while downloading the file in order to update a Progressbar.
I opted for a quite easy solution which shows a top window with a grab until the download process is completed.
my $tl = $mw->Toplevel( -title => 'WAIT' ); $tl->resizable( 0, 0 ); $tl->transient($tl->Parent->toplevel); $tl->protocol('WM_DELETE_WINDOW' => sub {}); $tl->grab; my $image_file = "wait.jpg"; my $splashphoto = $tl->{Photo} = $tl->Photo(-file => $image_file); $tl->Label(-image => $splashphoto, -bd => 0)->pack(-fill => 'both' +, -expand => 1);
|
|---|