The Toplevel widget methods are listed and explained in the following sections. It is important to note that all of these methods apply to a MainWindow as well; a MainWindow is just a specialized Toplevel widget. Also keep in mind that a lot of these methods were designed originally for use with a Unix windowing environment, and quite a few of them will state “No effect in Win32 system.” Many of these functions serve no useful purpose to the typical ordinary Perl/Tk application, but we document them here for thoroughness.
Several of the methods here alter window manager properties, which often look like WM_PROPERTY_THING. These properties are also traditionally associated with the X Window system on Unix, but some still apply in Win32 systems. If a specific method doesn’t say anything about which system it applies to, it will apply to both. If it applies only to one or the other (or only half-works in one system), this will be mentioned as well.
You can use the
geometry method to define or
retrieve a geometry string. A geometry string
determines the size and placement of a window on the screen. The
geometry string is a concept that originated on Unix systems and is a
bit cryptic at first glance. Here is a regular expression that
describes a complete geometry string:
The equals sign can be omitted completely (and usually is). The first
\d+x\d+) is the width and height (in that
order), separated by an
x. Both ...