Perl Tk GUI Design Question?

I'm looking for a way to use a bmp or gif as the background of a window. I can't quite figure how I would do that, but I assume it should be possible. Any help?

use Tk;
use strict;
my $mw = MainWindow->new;
$mw->geometry("400x100");
$mw->title("Main Window");
#$mw->Photo('imgbmp',-file=>"F:\matrix.gif");
#$mw->Label('-image'=>'imgbmp')->pack;
my $info_frame1 = $mw->Frame()->pack(-side => "top");

my $message1;
$message1 = $info_frame1->Entry()->pack(-side => "right");
$message1->focus;
$info_frame1->Label(-text => "Enter Username:")->pack(-side => "right");

my $button1 = $mw->Button(-text => "Open chat window",
-command => \&button1_sub)->pack(-side => "top");
$button1->bind('Tk::Entry','<Return>', \&button1_sub);
$mw->bind('Tk::Entry','<Key-Escape>', sub{exit});
$mw->Button(-text => "Exit", -command => sub{exit})->pack();
my $message;
 
Back
Top