Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tk:frame

Status
Not open for further replies.

moof15

Programmer
Aug 22, 2002
23
0
0
US
Can someone please explain how to do a frame within a frame?

Thanks,
moof15
 
Code:
#!/usr/local/bin/perl
use Tk;
use Tk::Pane;
use strict;

my $mw = new MainWindow;
$mw->Label(-text=>'Some Text in a Label above a scrolled pane')->pack(-side=>'top');

my $frame1 = $mw->Frame(-borderwidth=>'5', -background=>'white')->pack(-side=>'top', -fill=>'both');
$frame1->Button(-command=> sub {exit} )->pack(-side=>'left');

my $frame2 = $frame1->Frame(-borderwidth=>'5', -background=>'black')->pack(-side=>'top', -fill=>'both');
$frame2->Button(-command=> sub {exit} )->pack(-side=>'left');	

MainLoop;
'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top