in reply to Tk Dialog Manipulation
#!/usr/bin/perl use strict; use warnings; use Tk; my $top = new MainWindow; $top->Button( -text => 'Start LongTime.exe', -command => \&longtime ) ->pack; MainLoop; sub longtime { $top->Busy(-recurse => 1); my $tl = $top->Toplevel(); $tl->overrideredirect(1); $tl->geometry('300x100+100+100'); $tl->title( "Toplevel" ); $tl->Label( -text => "Working",-bg=>'lightyellow' ) ->pack(-expand=>1,-fill=>'both'); $tl->after(10,sub{ system('longtime.exe'); $tl->destroy(); $top->Unbusy(-recurse =>1); }); }
|
|---|