Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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]
[Discipulus]: good morning community!
[Corion]: Good morning Discipulus!

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2018-06-19 07:10 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (111 votes). Check out past polls.