#!/usr/bin/perl use strict; use warnings; use Tk; my $mw = MainWindow->new( -title => 'Testing Tk::Menu', -width => 500, -height => 100, -background => 'yellow', -name => 'Demo', ); $mw->minsize( 500, 300 ); my $bf = $mw->fontCreate('big', -family=>'arial', -weight=>'bold', -size=>int(-18*18/14)); my $menubar = $mw->Menu( -type => 'menubar', -font => "Verdana 18 bold", # -font => 'big' ); $mw->configure( -menu => $menubar ); $menubar->configure( -font => "Verdana 18 bold" ); #$menubar->configure( -font => 'big' ); my $m1 = $menubar->cascade( -label => 'File', -tearoff => 0, -menuitems => [ [ Button => 'New', -font => "Verdana 18 bold", -command => \&create_new_file ], [ Button => 'Open', -command => \&open_file, -font => 'big', -background => 'black', -foreground=> 'white', ], [ Button => 'Exit', -command => sub {exit} ], ] ); MainLoop; sub create_new_file { print "create_new_file...\n"; } sub open_file { print "open_file...\n"; } __END__