bcarroll has asked for the wisdom of the Perl Monks concerning the following question:
use warnings; use strict; use Tk; my $mw = tkinit(); my $button = $mw->Button(-text => 'Button')->pack(); $button->bind('<ButtonPress-1>', \&buttonPress); $mw->MainLoop(); sub buttonPress{ print 'RootX:' . $button->rootx . "\n"; print 'RootY:' . $button->rooty . "\n"; print 'Width:' . $button->cget(-width) . "\n"; print 'Height:' . $button->cget(-height) . "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to get the width/height of a Tk::Button widget?
by Khen1950fx (Canon) on Feb 06, 2012 at 16:58 UTC | |
|
Re: How to get the width/height of a Tk::Button widget?
by kcott (Archbishop) on Feb 06, 2012 at 18:02 UTC | |
by bcarroll (Pilgrim) on Feb 06, 2012 at 19:06 UTC | |
|
Re: How to get the width/height of a Tk::Button widget?
by thundergnat (Deacon) on Feb 06, 2012 at 15:54 UTC |