CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Perl/Tk: Clearing Widgets Inside a Frame: Edit Log



Claude2005
Novice

Aug 4, 2011, 6:00 PM


Views: 1075
Perl/Tk: Clearing Widgets Inside a Frame

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.


Code
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)


Edit Log:
Post edited by Claude2005 (Novice) on Aug 4, 2011, 6:01 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives