develooper Front page | perl.beginners | Postings from January 2002

perl/tk Mainwindow

Thread Next
From:
Venkatesh Karnam
Date:
January 10, 2002 11:52
Subject:
perl/tk Mainwindow
Message ID:
Pine.GSO.4.42.0201101148230.10421-100000@ultrasrvr34.amd.com

I'm trying to run the following code and open a new window. But the
program finishes without opening a window. Is there something wrong in
the code?

#!/usr/local/bin/perl5 -w
use Tk;

$main = MainWindow->new();

$menubar = $main->Frame(-relief => "raised",
			-borderwidth => 2)
		->pack(-anchor => "nw",
			-fill	=> "x");

$file_menu = $menubar->Menubutton(-text 	=>	"File",
				  -underline	=>	1)
			->pack(-side	=>	"left");
$file_menu->command(-label	=>	"Print",
			-command	=>	\&Print);


Thanks,
Venkat



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About