summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-12-10 02:18:49 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2002-12-10 02:18:49 (GMT)
commit731a986dfa321252e0c91d5dbf49670bd151382c (patch)
tree25333bd9ec749fd78bd21f9b93cf42646979cc34 /Lib/lib-tk
parentbca1cbc6f895c7f9f003877b1cfc0c649387ae1c (diff)
downloadcpython-731a986dfa321252e0c91d5dbf49670bd151382c.zip
cpython-731a986dfa321252e0c91d5dbf49670bd151382c.tar.gz
cpython-731a986dfa321252e0c91d5dbf49670bd151382c.tar.bz2
Upgrade to Tix-8.1.4 from Mike Clarkson (the maintainer)
Diffstat (limited to 'Lib/lib-tk')
-rwxr-xr-xLib/lib-tk/Tix.py25
1 files changed, 22 insertions, 3 deletions
diff --git a/Lib/lib-tk/Tix.py b/Lib/lib-tk/Tix.py
index 9d3f33f..5759356 100755
--- a/Lib/lib-tk/Tix.py
+++ b/Lib/lib-tk/Tix.py
@@ -256,7 +256,6 @@ class Form:
-
Tkinter.Widget.__bases__ = Tkinter.Widget.__bases__ + (Form,)
class TixWidget(Tkinter.Widget):
@@ -377,6 +376,26 @@ class TixWidget(Tkinter.Widget):
names = self._subwidget_names()
for name in names:
self.tk.call(name, 'configure', '-' + option, value)
+ # These are missing from Tkinter
+ def image_create(self, imgtype, cnf={}, master=None, **kw):
+ if not master:
+ master = Tkinter._default_root
+ if not master:
+ raise RuntimeError, 'Too early to create image'
+ if kw and cnf: cnf = _cnfmerge((cnf, kw))
+ elif kw: cnf = kw
+ options = ()
+ for k, v in cnf.items():
+ if callable(v):
+ v = self._register(v)
+ options = options + ('-'+k, v)
+ return master.tk.call(('image', 'create', imgtype,) + options)
+ def image_delete(self, imgname):
+ try:
+ self.tk.call('image', 'delete', imgname)
+ except TclError:
+ # May happen if the root was destroyed
+ pass
# Subwidgets are child widgets created automatically by mega-widgets.
# In python, we have to create these subwidgets manually to mirror their
@@ -565,6 +584,8 @@ class ComboBox(TixWidget):
# unavailable when -fancy not specified
pass
+ # align
+
def add_history(self, str):
self.tk.call(self._w, 'addhistory', str)
@@ -1247,8 +1268,6 @@ class PopupMenu(TixWidget):
class ResizeHandle(TixWidget):
"""Internal widget to draw resize handles on Scrolled widgets."""
- # FIXME: This is dangerous to expose to be called on its own.
- # Perhaps rename ResizeHandle to _ResizeHandle
def __init__(self, master, cnf={}, **kw):
# There seems to be a Tix bug rejecting the configure method
# Let's try making the flags -static