
Claude2005
Novice
Aug 4, 2011, 6:00 PM
Post #1 of 2
(1590 views)
|
Perl/Tk: Clearing Widgets Inside a Frame
|
Can't Post
|
|
Hello there, I was wondering if there's a way to clear widgets inside a frame. I intend to put the code inside the ClearAll subroutine.
use strict; use Tk; my $mw = MainWindow -> new; my $f = $mw -> Frame() -> pack(); for (1..5) { $f -> Label ( -text => $_ ) -> pack(); } $f = $mw -> Button ( -text => 'Clear', -command => \&ClearAll ) -> pack(); MainLoop; sub ClearAll { } Thanks in advance
(This post was edited by Claude2005 on Aug 4, 2011, 6:01 PM)
|