summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk/Tkinter.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-06-17 09:20:41 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-06-17 09:20:41 (GMT)
commit5ecad9ca13405d0cc4c2653435887a62e54bb673 (patch)
tree3a4931589aa95a82966f1e2a90c61f0f8d906216 /Lib/lib-tk/Tkinter.py
parent337487e3b87f887abdb3b47781508c6437cd7e94 (diff)
downloadcpython-5ecad9ca13405d0cc4c2653435887a62e54bb673.zip
cpython-5ecad9ca13405d0cc4c2653435887a62e54bb673.tar.gz
cpython-5ecad9ca13405d0cc4c2653435887a62e54bb673.tar.bz2
Patch #1096231: Add default argument to wm_iconbitmap.
Diffstat (limited to 'Lib/lib-tk/Tkinter.py')
-rw-r--r--Lib/lib-tk/Tkinter.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 7cbcb50..3370903 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -1500,10 +1500,19 @@ class Wm:
the group leader of this widget if None is given."""
return self.tk.call('wm', 'group', self._w, pathName)
group = wm_group
- def wm_iconbitmap(self, bitmap=None):
+ def wm_iconbitmap(self, bitmap=None, default=None):
"""Set bitmap for the iconified widget to BITMAP. Return
- the bitmap if None is given."""
- return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
+ the bitmap if None is given.
+
+ Under Windows, the DEFAULT parameter can be used to set the icon
+ for the widget and any descendents that don't have an icon set
+ explicitely. DEFAULT can be the relative path to a .ico file
+ (example: root.iconbitmap(default='myicon.ico') ). See Tk
+ documentation for more information."""
+ if default:
+ return self.tk.call('wm', 'iconbitmap', self._w, '-default', default)
+ else:
+ return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
iconbitmap = wm_iconbitmap
def wm_iconify(self):
"""Display widget as icon."""