summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk/Tix.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-11-25 14:50:56 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-11-25 14:50:56 (GMT)
commit652e1917c6f2bcdccb784d9d37950c381948a77c (patch)
tree717489558ffed3495a75ac253ac26a5e26795166 /Lib/lib-tk/Tix.py
parent3a89b2b13134767475c8e0c14381c1a722d7b836 (diff)
downloadcpython-652e1917c6f2bcdccb784d9d37950c381948a77c.zip
cpython-652e1917c6f2bcdccb784d9d37950c381948a77c.tar.gz
cpython-652e1917c6f2bcdccb784d9d37950c381948a77c.tar.bz2
Properly set static options for tixBalloon and tixResizeHandle.
Expose Tix.ResizeHandle.{detach_widget,hide,show}. Update Tix demos.
Diffstat (limited to 'Lib/lib-tk/Tix.py')
-rwxr-xr-xLib/lib-tk/Tix.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/Lib/lib-tk/Tix.py b/Lib/lib-tk/Tix.py
index 5f67a72..f7755a2 100755
--- a/Lib/lib-tk/Tix.py
+++ b/Lib/lib-tk/Tix.py
@@ -489,7 +489,9 @@ class Balloon(TixWidget):
message Message"""
def __init__(self, master=None, cnf={}, **kw):
- TixWidget.__init__(self, master, 'tixBalloon', ['options'], cnf, kw)
+ # static seem to be -installcolormap -initwait -statusbar -cursor
+ static = ['options', 'installcolormap', 'initwait', 'statusbar', 'cursor']
+ TixWidget.__init__(self, master, 'tixBalloon', static, cnf, kw)
self.subwidget_list['label'] = _dummyLabel(self, 'label',
destroy_physically=0)
self.subwidget_list['message'] = _dummyLabel(self, 'message',
@@ -1194,12 +1196,27 @@ class ResizeHandle(TixWidget):
"""Internal widget to draw resize handles on Scrolled widgets."""
def __init__(self, master, cnf={}, **kw):
+ # There seems to be a Tix bug rejecting the configure method
+ # Let's try making the flags -static
+ flags = ['options', 'command', 'cursorfg', 'cursorbg',
+ 'handlesize', 'hintcolor', 'hintwidth',
+ 'x', 'y']
+ # In fact, x y height width are configurable
TixWidget.__init__(self, master, 'tixResizeHandle',
- ['options'], cnf, kw)
+ flags, cnf, kw)
def attach_widget(self, widget):
self.tk.call(self._w, 'attachwidget', widget._w)
+ def detach_widget(self, widget):
+ self.tk.call(self._w, 'detachwidget', widget._w)
+
+ def hide(self, widget):
+ self.tk.call(self._w, 'hide', widget._w)
+
+ def show(self, widget):
+ self.tk.call(self._w, 'show', widget._w)
+
class ScrolledHList(TixWidget):
"""ScrolledHList - HList with automatic scrollbars."""