Destroying a Widget

You can destroy a widget by calling destroy on the widget (using if Tk::Exists is recommended):

$widget->destroy if Tk::Exists($widget);

If the widget is a parent of any other widgets, the other widgets are destroyed as well.

Get Mastering Perl/Tk now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.