Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Maximise or minimise Perl/Tk Main Window

by dree (Monsignor)
on Sep 18, 2002 at 11:51 UTC ( #198799=note: print w/ replies, xml ) Need Help??


in reply to Maximise or minimise Perl/Tk Main Window

What do you mean for "minimize" ? Iconify? If yes, try this:

use strict; use Tk; my $mw = new MainWindow; $mw->Frame(-width=>200, height =>25); $mw->Button(-text => "Maximize", -command => sub {$mw->geometry($mw->screenwidth . "x" . $mw->s +creenheight . "+0+0")}) ->pack(); $mw->Button(-text => "Minimize", -command => sub {$mw->iconify;}) ->pack(); $mw->Button(-text => "Close", -command => sub {exit;}) ->pack(); MainLoop;
You can try perldoc Tk::Wm


Comment on Re: Maximise or minimise Perl/Tk Main Window
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://198799]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2014-09-17 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (62 votes), past polls