Tkinter~about: 2 questions
Jeff Epler
jepler at unpythonic.net
Mon Nov 18 22:38:48 EST 2002
You can remove the "maximize" button (depending on window manager) of
toplevel t by executing t.wm_resizable(0,0) but this also prevents you
(as the name implies) from resizing the window. I'm not sure how to
remove the "minimize" button. However, t.wm_overrideredirect(1) should
give you a window with no standard decorations (no titlebar or border)
Changing the icon is presumably related to the wm_iconbitmap method.
wm iconbitmap window ?bitmap?
If bitmap is specified, then it names a bitmap in
the standard forms accepted by Tk (see the Tk_Get
Bitmap manual entry for details). This bitmap is
passed to the window manager to be displayed in
window's icon, and the command returns an empty
string. If an empty string is specified for
bitmap, then any current icon bitmap is cancelled
for window. If bitmap is specified then the com
mand returns an empty string. Otherwise it returns
the name of the current icon bitmap associated with
window, or an empty string if window has no icon
bitmap. On the Windows operating system, an addi
tional flag is supported: wm iconbitmap window
?-default? ?image?. If the -default flag is given,
the icon is applied to all toplevel windows (exist
ing and future) to which no other specific icon has
yet been applied. In addition to bitmap image
types, a full path specification to any file which
contains a valid Windows icon is also accepted
(usually .ico or .icr files), or any file for which
the shell has assigned an icon. Tcl will first
test if the file contains an icon, then if it has
an assigned icon, and finally, if that fails, test
for a bitmap.
(translation to Tkinter: t.wm_iconbitmap("blah"))
I don't know what Vpython is, so I can't answer that question.
Jeff
More information about the Python-list
mailing list