Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Reading Tk Window messages

by ichimunki (Priest)
on Oct 09, 2002 at 15:01 UTC ( #203942=note: print w/ replies, xml ) Need Help??


in reply to Reading Tk Window messages

Take a look at Tk::Toplevel, Tk::Wm, and Tk::after. You can set up a callback that runs periodically in your program to check for some of these things, using $toplevel->geometry() and $toplevel->status()-- this way you can detect when the geometry has changed, or if the user has minimzed or iconfied the application. You can't, unfortunately, directly catch these events as they happen. For that you might want to explore other GUI toolkits that explicitly offer these events as signals.

One question that I would ask is: why? Tk should handle most of your redrawing needs, and I'm not sure it's interesting to know if the user has tried to minimize the window... unless you're trying to coerce certain behavior.


Comment on Re: Reading Tk Window messages
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (15)
As of 2014-10-23 16:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (125 votes), past polls