Properly set static options for tixBalloon and tixResizeHandle.

Expose Tix.ResizeHandle.{detach_widget,hide,show}.
Update Tix demos.
This commit is contained in:
Martin v. Löwis 2001-11-25 14:50:56 +00:00
parent 3a89b2b131
commit 652e1917c6
4 changed files with 214 additions and 52 deletions

View file

@ -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."""