Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2020-10-28 11:50 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (260 votes). Check out past polls.