Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 imbibing at the Monastery: (10)
As of 2015-07-06 18:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (80 votes), past polls