NAME
Tk::mySplashScreen - annother Perl/Tk implementation of a splash screen
SYNOPSIS
use Tk; require Tk::mySplashScreen;
my $Splash = Tk::mySplashScreen->new(
-image => "/path/to/image.gif",
-text => "this is a splash screen"
);
$Splash->configure(-text => "new message");
$Splash->configure(-image => $newTKimageObject);
$Splash->configure(-image => "path/to/new/file.gif");
$Splash->configure(-anchor => 'n|s|e|w');
$Splash->configure(-hide => 1); #hide it
$Splash->configure(-hide => 0); #unhide it (if already hidden)
$myContentFrame = $Splash->AltContent();
$Splash->destroy();
new (Constructor)
Notes
The new method creates a new toplevel window and puts an image and a message in it. Note that there is no parent widget.
Options
- -text
-
this is the message text you wish to display in the splash screen
- -image
-
this is alternately, the path to a file containing a supported image type, or a reference to a pre-existing Tk::Image object. In either case the image is displayed in the splash screen window.
hide
Notes
this will hide (undraw) the splash screen, but not destroy the object.
unhide
head2 Notes
this will unhide a hidden splash screen. Obviously, this dosen't do much unless the window has already been hidden.
AltContent
Notes
this allows you to add custom content on the splash screen between the image and the message display. This is handy if, for instance, you want to ask for a username and password before showing your main program or whatever. This works by returning a frame reference. You can pack whatever you want into the frame. When you're done, just destroy the frame reference.
Example
$frame = $Splash->AltContent();
$frame->label(-text => "enter your password")->pack();
$frame->entry( -width => 20, -show => '*', -variable => \$pass )->pack();
..etc
Author
Andrew N. Hicox <andrew@hicox.com>