my $frame = $main->Frame(
-container => 1, -width => 320, -height => 240
)->pack(
-side => 'top',
-fill => 'both',
-expand => 1
);
####
my $frameID = $frame->id;
print "My ID is: $frameID\n";
####
#! /usr/local/bin/perl -w
use strict;
use Tk;
my $main = MainWindow->new(
-title => 'Container Test'
);
my $frame1 = $main->Frame->pack(
-side => 'top',
-fill => 'x'
);
my $frame2 = $main->Frame(
-container => 1, -width => 320, -height => 240
)->pack(
-side => 'top',
-fill => 'both',
-expand => 1
);
my $frame3 = $main->Frame->pack(
-side => 'top',
-fill => 'x'
);
$frame1->Button(-text => 'xanim', -command => [ \&open_xterm, $frame2 ])->pack;
$frame1->Button(-text => 'Quit', -command => \&exit)->pack;
$frame1->Label(-text => "This is above the container frame")->pack;
$frame3->Label(-text => "This is below the container frame")->pack;
MainLoop;
exit;
sub open_xterm
{
my $frame = shift;
my $display = "xanim -Zr +W".$frame->id." /space/litherm/TheDamian.gif &";
print $display,"\n";
system($display);
}