MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / destroy

Method destroy

tools/python-3.11.9-amd64/Lib/tkinter/tix.py:455–467  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

453 self.destroy_physically = destroy_physically
454
455 def destroy(self):
456 # For some widgets e.g., a NoteBook, when we call destructors,
457 # we must be careful not to destroy the frame widget since this
458 # also destroys the parent NoteBook thus leading to an exception
459 # in Tkinter when it finally calls Tcl to destroy the NoteBook
460 for c in list(self.children.values()): c.destroy()
461 if self._name in self.master.children:
462 del self.master.children[self._name]
463 if self._name in self.master.subwidget_list:
464 del self.master.subwidget_list[self._name]
465 if self.destroy_physically:
466 # This is bypassed only for a few widgets
467 self.tk.call('destroy', self._w)
468
469
470# Useful class to create a display style - later shared by many items.

Callers

nothing calls this directly

Calls 4

listFunction · 0.85
callMethod · 0.80
valuesMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected