@@ -419,9 +419,6 @@ def tk_setPalette(self, *args, **kw):
419419 disabledForeground, insertBackground, troughColor."""
420420 self .tk .call (('tk_setPalette' ,)
421421 + _flatten (args ) + _flatten (list (kw .items ())))
422- def tk_menuBar (self , * args ):
423- """Do not use. Needed in Tk 3.6 and earlier."""
424- pass # obsolete since Tk 4.0
425422 def wait_variable (self , name = 'PY_VAR' ):
426423 """Wait until the variable is modified.
427424
@@ -719,9 +716,6 @@ def tkraise(self, aboveThis=None):
719716 """Raise this widget in the stacking order."""
720717 self .tk .call ('raise' , self ._w , aboveThis )
721718 lift = tkraise
722- def colormodel (self , value = None ):
723- """Useless. Not implemented in Tk."""
724- return self .tk .call ('tk' , 'colormodel' , self ._w , value )
725719 def winfo_atom (self , name , displayof = 0 ):
726720 """Return integer which represents atom NAME."""
727721 args = ('winfo' , 'atom' ) + self ._displayof (displayof ) + (name ,)
@@ -2165,21 +2159,6 @@ def __init__(self, master=None, cnf={}, **kw):
21652159 """
21662160 Widget .__init__ (self , master , 'button' , cnf , kw )
21672161
2168- def tkButtonEnter (self , * dummy ):
2169- self .tk .call ('tkButtonEnter' , self ._w )
2170-
2171- def tkButtonLeave (self , * dummy ):
2172- self .tk .call ('tkButtonLeave' , self ._w )
2173-
2174- def tkButtonDown (self , * dummy ):
2175- self .tk .call ('tkButtonDown' , self ._w )
2176-
2177- def tkButtonUp (self , * dummy ):
2178- self .tk .call ('tkButtonUp' , self ._w )
2179-
2180- def tkButtonInvoke (self , * dummy ):
2181- self .tk .call ('tkButtonInvoke' , self ._w )
2182-
21832162 def flash (self ):
21842163 """Flash the button.
21852164
@@ -2678,28 +2657,6 @@ def __init__(self, master=None, cnf={}, **kw):
26782657 disabledforeground, fg, font, foreground, postcommand, relief,
26792658 selectcolor, takefocus, tearoff, tearoffcommand, title, type."""
26802659 Widget .__init__ (self , master , 'menu' , cnf , kw )
2681- def tk_bindForTraversal (self ):
2682- pass # obsolete since Tk 4.0
2683- def tk_mbPost (self ):
2684- self .tk .call ('tk_mbPost' , self ._w )
2685- def tk_mbUnpost (self ):
2686- self .tk .call ('tk_mbUnpost' )
2687- def tk_traverseToMenu (self , char ):
2688- self .tk .call ('tk_traverseToMenu' , self ._w , char )
2689- def tk_traverseWithinMenu (self , char ):
2690- self .tk .call ('tk_traverseWithinMenu' , self ._w , char )
2691- def tk_getMenuButtons (self ):
2692- return self .tk .call ('tk_getMenuButtons' , self ._w )
2693- def tk_nextMenu (self , count ):
2694- self .tk .call ('tk_nextMenu' , count )
2695- def tk_nextMenuEntry (self , count ):
2696- self .tk .call ('tk_nextMenuEntry' , count )
2697- def tk_invokeMenu (self ):
2698- self .tk .call ('tk_invokeMenu' , self ._w )
2699- def tk_firstMenu (self ):
2700- self .tk .call ('tk_firstMenu' , self ._w )
2701- def tk_mbButtonDown (self ):
2702- self .tk .call ('tk_mbButtonDown' , self ._w )
27032660 def tk_popup (self , x , y , entry = "" ):
27042661 """Post the menu at position X,Y with entry ENTRY."""
27052662 self .tk .call ('tk_popup' , self ._w , x , y , entry )
@@ -2938,14 +2895,6 @@ def bbox(self, index):
29382895 box of the visible part of the character at the given index."""
29392896 return self ._getints (
29402897 self .tk .call (self ._w , 'bbox' , index )) or None
2941- def tk_textSelectTo (self , index ):
2942- self .tk .call ('tk_textSelectTo' , self ._w , index )
2943- def tk_textBackspace (self ):
2944- self .tk .call ('tk_textBackspace' , self ._w )
2945- def tk_textIndexCloser (self , a , b , c ):
2946- self .tk .call ('tk_textIndexCloser' , self ._w , a , b , c )
2947- def tk_textResetAnchor (self , index ):
2948- self .tk .call ('tk_textResetAnchor' , self ._w , index )
29492898 def compare (self , index1 , op , index2 ):
29502899 """Return whether between index INDEX1 and index INDEX2 the
29512900 relation OP is satisfied. OP is one of <, <=, ==, >=, >, or !=."""
@@ -3823,28 +3772,6 @@ def panes(self):
38233772 """Returns an ordered list of the child panes."""
38243773 return self .tk .splitlist (self .tk .call (self ._w , 'panes' ))
38253774
3826- ######################################################################
3827- # Extensions:
3828-
3829- class Studbutton (Button ):
3830- def __init__ (self , master = None , cnf = {}, ** kw ):
3831- Widget .__init__ (self , master , 'studbutton' , cnf , kw )
3832- self .bind ('<Any-Enter>' , self .tkButtonEnter )
3833- self .bind ('<Any-Leave>' , self .tkButtonLeave )
3834- self .bind ('<1>' , self .tkButtonDown )
3835- self .bind ('<ButtonRelease-1>' , self .tkButtonUp )
3836-
3837- class Tributton (Button ):
3838- def __init__ (self , master = None , cnf = {}, ** kw ):
3839- Widget .__init__ (self , master , 'tributton' , cnf , kw )
3840- self .bind ('<Any-Enter>' , self .tkButtonEnter )
3841- self .bind ('<Any-Leave>' , self .tkButtonLeave )
3842- self .bind ('<1>' , self .tkButtonDown )
3843- self .bind ('<ButtonRelease-1>' , self .tkButtonUp )
3844- self ['fg' ] = self ['bg' ]
3845- self ['activebackground' ] = self ['bg' ]
3846-
3847- ######################################################################
38483775# Test:
38493776
38503777def _test ():
0 commit comments