MCPcopy Index your code
hub / github.com/python/cpython / Misc

Class Misc

Lib/tkinter/__init__.py:689–2126  ·  view source on GitHub ↗

Internal class. Base class which defines methods common for interior widgets.

Source from the content-addressed store, hash-verified

687# Methods defined on both toplevel and interior widgets
688
689class Misc:
690 """Internal class.
691
692 Base class which defines methods common for interior widgets."""
693
694 # used for generating child widget names
695 _last_child_ids = None
696
697 # XXX font command?
698 _tclCommands = None
699
700 def destroy(self):
701 """Internal function.
702
703 Delete all Tcl commands created for
704 this widget in the Tcl interpreter."""
705 if self._tclCommands is not None:
706 for name in self._tclCommands:
707 self.tk.deletecommand(name)
708 self._tclCommands = None
709
710 def deletecommand(self, name):
711 """Internal function.
712
713 Delete the Tcl command provided in NAME."""
714 self.tk.deletecommand(name)
715 try:
716 self._tclCommands.remove(name)
717 except ValueError:
718 pass
719
720 def tk_strictMotif(self, boolean=None):
721 """Set Tcl internal variable, whether the look and feel
722 should adhere to Motif.
723
724 A parameter of 1 means adhere to Motif (e.g. no color
725 change if mouse passes over slider).
726 Returns the set value."""
727 return self.tk.getboolean(self.tk.call(
728 'set', 'tk_strictMotif', boolean))
729
730 def tk_bisque(self):
731 """Change the color scheme to light brown as used in Tk 3.6 and before."""
732 self.tk.call('tk_bisque')
733
734 def tk_setPalette(self, *args, **kw):
735 """Set a new color scheme for all widget elements.
736
737 A single color as argument will cause that all colors of Tk
738 widget elements are derived from this.
739 Alternatively several keyword parameters and its associated
740 colors can be given. The following keywords are valid:
741 activeBackground, foreground, selectColor,
742 activeForeground, highlightBackground, selectBackground,
743 background, highlightColor, selectForeground,
744 disabledForeground, insertBackground, troughColor."""
745 self.tk.call(('tk_setPalette',)
746 + _flatten(args) + _flatten(list(kw.items())))

Callers

nothing calls this directly

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…