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

(ichi) Re x 2: tk question: strick app cann't close by clicking

by ichimunki (Priest)
on Apr 25, 2002 at 18:38 UTC ( #162066=note: print w/ replies, xml ) Need Help??


in reply to Re: tk question: strick app cann't close by clicking
in thread tk question: strick app cann't close by clicking

Great trick. What it really does is capture the signal sent by clicking the close button and smother it. This prevents the button from working, but doesn't necessarily make it go away (it doesn't on the Windows machine I am using just now)-- which as a user-interface thing is bad. The user who tries to click the close button may actually become frustrated and close the window some other way. Or they may just think the programmer is incompetent. ;)

By the way, you can get around the bareword issue by simply quoting: "WM_DELETE_WINDOW".


Comment on (ichi) Re x 2: tk question: strick app cann't close by clicking
Re: (ichi) Re x 2: tk question: strick app cann't close by clicking
by BlueBlazerRegular (Friar) on Apr 26, 2002 at 15:26 UTC
    Thanks ichimunki, for the help on the bareword issue. And I agree with you - if you re-direct the close button, you should do something with it, rather than just ignoring the darn thing.

    Normally, I have my 'clean up' sub-routine right after the 'MainLoop', so if when they click on the close button it'll go there by default. This 'clean up' routine is also called by the 'Quit' button (or menu item).


    And on a completely different subject - I've found that when you try to plug someone's username into the reply, make sure you have their id right. Or else you get links to some interesting locations...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2014-04-19 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (478 votes), past polls