RE: example from Mastering Perl/Tk (correction)
by Everett, Toby other posts by this author
May 8 2003 10:56PM messages near this date
Re: example from Mastering Perl/Tk (correction)
|
Re: example from Mastering Perl/Tk
-----Original Message-----
From: Ala Qumsieh [mailto:qumsieh@[...].ca]
Sent: Thursday, May 08, 2003 1:46 PM
To: Tim Harsch
Cc: PTK; Michael van Nieuwenhuize
Subject: Re: example from Mastering Perl/Tk (correction)
> Frame is the base widget. It is just an empty window with no
> decorations. Toplevel is a frame with window decorations that
> makes it visible to your desktop manager[*]. MainWindow is just a special
> instance of Toplevel; it's simply the first Toplevel in your program.
Also, closing a Toplevel that isn't MainWindow doesn't close your whole program. Closing Ma
inWindow does, unless you have multiple MainWindows open, in which case closing the last ope
n MainWindow will close your program (along with any plain Toplevels that are open). Finall
y, you can get some really weird behavior out of some widgets if you have multiple MainWindo
ws open (personal experience), so I recommend against it. If you want the "close any window
as long as another window is open" behavior, make the MainWindow hidden, make all of the vi
sible windows Toplevels, and whenever a Toplevel closes, check to see if there are any other
Toplevels open and if not, exit.
There. I think that was the least convoluted paragraph I've ever written! Honest:)
--Toby Everett
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@lists.stanford.edu
|