CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Tk Menu Options

 



AirForce1
New User

Sep 10, 2010, 9:44 AM

Post #1 of 2 (623 views)
Tk Menu Options Can't Post

I hope this is something silly that i've overlooked. I just want a simple menu at the top of my MainWindow, except I'd like it to have a boarder and a different font and background color. As you can see from the code, I've added my options to the Menu itself but this seems to have no effect on the menu. Can someone please tell me what I'm doing wrong?


Code
#!perl -w 
use strict;
use warnings;
use Tk;

my $mw = MainWindow->new();

my $menubar = $mw->Menu( -borderwidth=> 2, -relief=> "groove", -font=> "{Sans} 14 bold", -background=> 'white' );
$mw->configure( -menu=> $menubar );

my $fileMenu = $menubar->cascade( -label=> "~File", -tearoff => 0 );
$fileMenu->command( -label=> 'E~xit', -command=> \&exit );

MainLoop();



AirForce1
New User

Sep 13, 2010, 10:14 AM

Post #2 of 2 (589 views)
Re: [AirForce1] Tk Menu Options [In reply to] Can't Post

I should probably add that I am using Perl v5.10 on a WinXP machine.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives