placeForget all at once ? 
Author Message
 placeForget all at once ?

Hi,
i write a script in Perl-Tk and i am using the Placer.
now i have placed around 80 objects (moustly buttons) and have to
placeForget them because i want use the same mainWindow with a
completly different content.
Now my question :
is there a way to placeForet all widgets from a MainWindow at once ?

thx for answers!

mfg.: Sascha J.
=^_^=



Sun, 13 Mar 2005 18:59:04 GMT  
 placeForget all at once ?

Quote:
> Hi,
> i write a script in Perl-Tk and i am using the Placer.
> now i have placed around 80 objects (moustly buttons) and have to
> placeForget them because i want use the same mainWindow with a
> completly different content.
> Now my question :
> is there a way to placeForet all widgets from a MainWindow at once ?

Either placeForget them in a loop.... or

..ensure each button widget has the same master, such as a Tk::Frame, then just
pack/placeForget the frame. Then when you need your widgets back again
re-place/pack the frame into the MainWindow. When you are creating your
completely different content, just put the new buttons into a new frame.

I am assuming you will be using these 'forgot' button widgets again, right? If
not, then you should be ->destroy'ing them instead.

Jack



Sun, 13 Mar 2005 23:22:38 GMT  
 placeForget all at once ?

Quote:
>placeForget them because i want use the same mainWindow with a
>completly different content.
>Now my question :
>is there a way to placeForet all widgets from a MainWindow at once ?

So you're going to essentially cache the buttons, and reconfigure/reuse them
for the totally
new content? Or do you plan on recreating the buttons for the new content.. if
so you might just
put the widgets within a frame in the MainWidget,
and destroy that frame... or call children on MainWindow and destroy each of
it's children. (destroy works recursively).

Rob



Tue, 15 Mar 2005 15:09:42 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. placeForget behavior

2. Module development: once is enough

3. Working with two streams at once: ack pth!

4. match all but once?

5. Multiple dbmopen()'s at once (perl4)

6. Alias::const: avoiding `used only once...' warning

7. alarm only works once???

8. Reading MOTD but only once.

9. Once again: CGI help

10. regexp to negate 2 chars at once

11. Matching two patterns at once

12. Get directory only once and put it in array with File::Find

 

 
Powered by phpBB® Forum Software