@@ -256,7 +256,6 @@ def slaves(self):
256256
257257
258258
259-
260259Tkinter .Widget .__bases__ = Tkinter .Widget .__bases__ + (Form ,)
261260
262261class TixWidget (Tkinter .Widget ):
@@ -377,6 +376,26 @@ def config_all(self, option, value):
377376 names = self ._subwidget_names ()
378377 for name in names :
379378 self .tk .call (name , 'configure' , '-' + option , value )
379+ # These are missing from Tkinter
380+ def image_create (self , imgtype , cnf = {}, master = None , ** kw ):
381+ if not master :
382+ master = Tkinter ._default_root
383+ if not master :
384+ raise RuntimeError , 'Too early to create image'
385+ if kw and cnf : cnf = _cnfmerge ((cnf , kw ))
386+ elif kw : cnf = kw
387+ options = ()
388+ for k , v in cnf .items ():
389+ if callable (v ):
390+ v = self ._register (v )
391+ options = options + ('-' + k , v )
392+ return master .tk .call (('image' , 'create' , imgtype ,) + options )
393+ def image_delete (self , imgname ):
394+ try :
395+ self .tk .call ('image' , 'delete' , imgname )
396+ except TclError :
397+ # May happen if the root was destroyed
398+ pass
380399
381400# Subwidgets are child widgets created automatically by mega-widgets.
382401# In python, we have to create these subwidgets manually to mirror their
@@ -565,6 +584,8 @@ def __init__ (self, master=None, cnf={}, **kw):
565584 # unavailable when -fancy not specified
566585 pass
567586
587+ # align
588+
568589 def add_history (self , str ):
569590 self .tk .call (self ._w , 'addhistory' , str )
570591
@@ -1247,8 +1268,6 @@ def post_widget(self, widget, x, y):
12471268
12481269class ResizeHandle (TixWidget ):
12491270 """Internal widget to draw resize handles on Scrolled widgets."""
1250- # FIXME: This is dangerous to expose to be called on its own.
1251- # Perhaps rename ResizeHandle to _ResizeHandle
12521271 def __init__ (self , master , cnf = {}, ** kw ):
12531272 # There seems to be a Tix bug rejecting the configure method
12541273 # Let's try making the flags -static
0 commit comments