OnDestroy - Arrange for callback when widget is destroyed.
$widget->OnDestroy(callback);
OnDestroy accepts a standard perl/Tk callback.
When the window associated with $widget is destroyed then
the callback is invoked. Unlike $widget->('<Destroy>',...)
the widgets methods are still available when callback is executed,
so (for example) a Text widget can save its contents to a file.
OnDestroy was required for new after mechanism.
destroy
callbacks
after
bind
destroy