in reply to Re: Problems with Tk::SplashScreen and Tk::Splash
in thread Problems with Tk::SplashScreen and Tk::Splash
Thank you for your help. Unfortunately this does not quite achieve what I want. For some (slightly frustrating) reason, execution of the program is halted while the splash screen is displayed (the screen does not appear until the call to destroy, which is a blocking call (see below)). I want the splash screen to display while initialization continues in the background.
Yarr!
#!/usr/bin/perl use strict; use warnings; use Tk; use Tk::Splashscreen; my $mw = MainWindow->new; $mw->Button( -text => 'Exit', -command => sub {exit} )->pack; my $sp = $mw->Splashscreen; $sp->Label(-text => 'Tk... Ick!', -font => [-size => 250])->pack; $sp->Splash; #nothing displayed yet sleep(10); # Still no splash screen $sp->Destroy(5000); # Now we see the splash screen # But execution of the program is on hold until # the screen goes away... Boo! MainLoop;
They say that time changes things, but you actually have to change them yourself.
Andy Warhol
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Problems with Tk::SplashScreen and Tk::Splash
by thundergnat (Deacon) on Jun 15, 2005 at 19:13 UTC | |
by JediWizard (Deacon) on Jun 15, 2005 at 20:29 UTC | |
|
Re^3: Problems with Tk::SplashScreen and Tk::Splash
by zentara (Cardinal) on Jun 16, 2005 at 11:04 UTC | |
by JediWizard (Deacon) on Jun 16, 2005 at 13:05 UTC | |
by zentara (Cardinal) on Jun 17, 2005 at 13:16 UTC |