Create a toplevel widget, displayed independently from the main window with the same decoration as the window system, using the
Toplevel
method.
The standard configuration options that apply to
Toplevel
are:
-background
,
-bg
,
-borderwidth
,
-bw
,
-cursor
,
-height
,
-highlightbackground
,
-highlightcolor
,
-highlightthickness
,
-relief
,
-takefocus
, and
-width
.
Other options are:
-class =>
name
-colormap =>
\$window
Specifies another window to share the colormap with. You can point to another window or use the value
"new"
to specify a new colormap. Default is
undef
.
-screen =>
screen
-visual =>
type n
In addition to
cget
and
configure
, the following methods are supported by the Toplevel widget. Note that since the MainWindow is a Toplevel widget, each of these methods applies to the MainWindow as well.
aspect
Returns the constraints to the aspect of the window. The four-item list returned corresponds to the minimum width, the minimum height, the maximum width, and the maximum height.
client
colormapwindows
For the X Window System, passes a list of windows to the window manager that have private colormaps. Controls the WM_COLORMAP_WINDOWS property.
command
For the X Window System, returns the command used to start the application.
deiconify
focusmodel
frame
Returns the ID of the parent widget as a hexadecimal string.
geometry
For the X Window System, gets the geometry of the toplevel widget.
grid
group
Makes the widget the group leader of a set of related windows.
iconbitmap
Identifies a bitmap to use as an icon when the window is iconified.
iconify
iconmask
iconname
iconposition
iconwindow
Specifies a widget to use in place of an icon when iconified.
maxsize
minsize
overrideredirect
positionfrom
Returns either "program" or "user", to tell you whether the user or window manager requested its current position.
protocol
Given one of the window managers WM_DELETE_WINDOW, WM_SAVE_YOURSELF, or WM_TAKE_FOCUS, allows you to define a callback to execute when an associated event is detected.
resizable
Takes boolean values representing whether the window can be resized in width and height, respectively.
sizefrom
Returns either "program" or "user", to tell you whether the user or window manager requested its current size.
state
Returns
"normal"
,
"iconic"
, or
"withdrawn"
, indicating the current state of the window.
title
transient
Indicates to the window manager that the window is transient.
withdraw
Copyright © 2001 O'Reilly & Associates. All rights reserved.