Deleting a Frame 
Author Message
 Deleting a Frame

Happy New Year to all.

Can anyone provide some guidance w.r.t. deleting a frame. I have created a
Perl/Tk script that, depending on how a Checkbutton is set, will create a
frame into which I write some text based on some computations. I have a
clear button that is used to clear entry widgets, text widgets and also
deselect() the Checkbutton but I would also like to delete the frame that
was created so that when the script is run again, a new frame is created.

Any suggestions?

Thanks in advance,

Alfred Forbrich



Mon, 23 Jun 2003 03:49:21 GMT  
 Deleting a Frame

Quote:
> Happy New Year to all.

> Can anyone provide some guidance w.r.t. deleting a frame. I have created a
> Perl/Tk script that, depending on how a Checkbutton is set, will create a
> frame into which I write some text based on some computations. I have a
> clear button that is used to clear entry widgets, text widgets and also
> deselect() the Checkbutton but I would also like to delete the frame that
> was created so that when the script is run again, a new frame is created.

Try $frame->destroy.  I don't know whether or not you should do
$frame->packForget and/or destroy all child widgets first.

--
Marc Dashevsky  (remove "_" from address to reply by e-mail)



Mon, 23 Jun 2003 09:37:44 GMT  
 Deleting a Frame

Quote:
>> Can anyone provide some guidance w.r.t. deleting a frame. I have created a
>> Perl/Tk script that, depending on how a Checkbutton is set, will create a
>> frame into which I write some text based on some computations. I have a
>> clear button that is used to clear entry widgets, text widgets and also
>> deselect() the Checkbutton but I would also like to delete the frame that
>> was created so that when the script is run again, a new frame is created.

>Try $frame->destroy.  I don't know whether or not you should do
>$frame->packForget and/or destroy all child widgets first.

As Marc pointed out, this should do what you wish, destroy
will destroy the immediate window and all it's descendants,
and perhaps this IS the best way of doing things, but you
might consider reusing the existing frame and just update
the new calculations in it. I think this might be more
efficient than constantly recreating another frame for each
recalculation. Just a thought...

Rob



Mon, 23 Jun 2003 19:21:17 GMT  
 Deleting a Frame
Thanks, for the information.

Alfred


Quote:
> > Happy New Year to all.

> > Can anyone provide some guidance w.r.t. deleting a frame. I have created
a
> > Perl/Tk script that, depending on how a Checkbutton is set, will create
a
> > frame into which I write some text based on some computations. I have a
> > clear button that is used to clear entry widgets, text widgets and also
> > deselect() the Checkbutton but I would also like to delete the frame
that
> > was created so that when the script is run again, a new frame is
created.

> Try $frame->destroy.  I don't know whether or not you should do
> $frame->packForget and/or destroy all child widgets first.

> --
> Marc Dashevsky  (remove "_" from address to reply by e-mail)



Mon, 23 Jun 2003 22:33:11 GMT  
 Deleting a Frame
Suggestions provided in this Thread worked.

i.e. $Frame->packForget();
     $Frame->destroy();

Thanks,

Alfred Forbrich



Quote:
> Happy New Year to all.

> Can anyone provide some guidance w.r.t. deleting a frame. I have created a
> Perl/Tk script that, depending on how a Checkbutton is set, will create a
> frame into which I write some text based on some computations. I have a
> clear button that is used to clear entry widgets, text widgets and also
> deselect() the Checkbutton but I would also like to delete the frame that
> was created so that when the script is run again, a new frame is created.

> Any suggestions?

> Thanks in advance,

> Alfred Forbrich



Mon, 23 Jun 2003 23:44:04 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. how to delete/refresh the frame member widgets?

2. Creating sub frame in frame in an existing window

3. Using my delete() alongside Perl's delete()??

4. PERLFUNC: delete - deletes a value from a hash

5. PERLFUNC: delete - deletes a value from a hash

6. CGI.pm delete(), Delete()

7. Website uses frames to call perl scripts -- must I use frames?

8. Frames and CGI.pm: How to send output to two frames?

9. Frames

10. can't extract frames

11. HTML::Element::extract_links not grabbing frame sources

12. LWP and Frames

 

 
Powered by phpBB® Forum Software