Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How to close frame after executing in Perl TK?

by davidj (Priest)
on Feb 11, 2005 at 10:59 UTC ( [id://430046]=note: print w/replies, xml ) Need Help??


in reply to How to close frame after executing in Perl TK?

you can use the destroy method.

#!/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 }
hope this helps,
davidj

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
    It's working fine. Thanks David.

    --c

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://430046]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-24 01:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found