Home: Perl Programming Help: Intermediate:
Tk Menu Options

New User

Sep 10, 2010, 9:44 AM

Views: 1681
Tk Menu Options

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?

#!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 );


New User

Sep 13, 2010, 10:14 AM

Views: 1647
Re: [AirForce1] Tk Menu Options

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