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

Method __init__

Lib/tkinter/__init__.py:2847–2862  ·  view source on GitHub ↗

Construct a widget with the parent widget MASTER, a name WIDGETNAME and appropriate options.

(self, master, widgetName, cnf={}, kw={}, extra=())

Source from the content-addressed store, hash-verified

2845 self.master.children[self._name] = self
2846
2847 def __init__(self, master, widgetName, cnf={}, kw={}, extra=()):
2848 """Construct a widget with the parent widget MASTER, a name WIDGETNAME
2849 and appropriate options."""
2850 if kw:
2851 cnf = _cnfmerge((cnf, kw))
2852 self.widgetName = widgetName
2853 self._setup(master, cnf)
2854 if self._tclCommands is None:
2855 self._tclCommands = []
2856 classes = [(k, v) for k, v in cnf.items() if isinstance(k, type)]
2857 for k, v in classes:
2858 del cnf[k]
2859 self.tk.call(
2860 (widgetName, self._w) + extra + self._options(cnf))
2861 for k, v in classes:
2862 k.configure(self, v)
2863
2864 def destroy(self):
2865 """Destroy this and all descendants widgets."""

Callers

nothing calls this directly

Calls 6

_setupMethod · 0.95
_cnfmergeFunction · 0.85
itemsMethod · 0.45
callMethod · 0.45
_optionsMethod · 0.45
configureMethod · 0.45

Tested by

no test coverage detected