#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = tkinit; my $menubar = $mw->Menu(-type => 'menubar'); $mw->configure(-menu => $menubar); my $menu = $menubar->cascade(-label => '~File'); $menu->command(-label => '~New'); $menu->command(-label => '~Open'); $mw->Button(-text => 'Push me', -command => sub{ print "Reqheight:", $menubar->reqheight, " Reqwidth:", $menubar->reqw +idth, "\n"; } )->pack; MainLoop;
In reply to Re: Finding the height of a menubar
by zentara
in thread Finding the height of a menubar
by aplonis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |