Not sure what you mean by OnDestroy. The standard way of doing this is to bind a <Destroy> event on a passive widget (such as a label) on your main window. Don't bind the main window itself, as all subwidgets will inherit the binding; that way leads to much confusion and many bugs.
If you don't mind the cleanup happening after the main window is destroyed, you can always put the cleanup code after MainLoop, so it won't get called until MainLoop returns.
--
Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)
In reply to Re: Tk before destroy event
by rinceWind
in thread Tk before destroy event
by fluffyvoidwarrior
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |