in reply to How to close frame after executing in Perl TK?
hope this helps,#!/usr/bin/perl use Tk; use strict; my $mw =MainWindow->new(); # Main Window my $frame = $mw->Frame() -> pack(); #New Frame my $lbl = $frame->Label(-text => "some text")->pack(); my $but = $mw -> Button(-text=>"Destroy frame", -command =>\&destroy_f +rame) -> pack(); MainLoop; #This function will destroy the frame when the button is pushed sub destroy_frame { $frame->destroy(); # destroy method called here }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to close frame after executing in Perl TK?
by cognizant (Pilgrim) on Feb 11, 2005 at 11:19 UTC |