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

tk minimize event

by blueberryCoffee (Scribe)
on Mar 21, 2005 at 07:24 UTC ( [id://441134]=perlquestion: print w/replies, xml ) Need Help??

blueberryCoffee has asked for the wisdom of the Perl Monks concerning the following question:

I want to know when a user minimizes my tk app so I can put a small status indicator in the corner.

I have looked in tk::widgets, tk::wm, tk::bind, and tk::toplevel docs and found nothing about events like this (minimize, maximize). I also searched the perl directory for any mention of the word "minimize". Am I looking for the wrong word? How can I set callbacks for these events?

Thanks

Replies are listed 'Best First'.
Re: tk minimize event
by PodMaster (Abbot) on Mar 21, 2005 at 08:12 UTC
      Thanks, found it on perltk.org

      For anyone else who wishes to know. The tags to bind are 'Configure', 'Map', and 'Unmap'.

      The Configure event is fired any time you move or resize the window (this includes maximizing). The Map event happens when you un-minimize a window, and Unmap happens when you minimize the window.

      An example:
      use Tk; my $app = new MainWindow; $app->bind('<Configure>', sub{ print "configure"; }); $app->bind('<Unmap>', sub{ print "Unmap"; }); $app->bind('<Map>', sub{ print "Map"; }); MainLoop;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://441134]
Approved by ysth
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-19 19:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found