MCPcopy Create free account
hub / github.com/ActiveState/code / delete

Method delete

recipes/Python/577261_Python_Tkinter_Tabs/recipe-577261.py:58–69  ·  view source on GitHub ↗
(self, tabname)

Source from the content-addressed store, hash-verified

56 self.buttons[tab.tab_name] = b # add it to the list of buttons
57
58 def delete(self, tabname):
59
60 if tabname == self.current_tab:
61 self.current_tab = None
62 self.tabs[tabname].pack_forget()
63 del self.tabs[tabname]
64 self.switch_tab(self.tabs.keys()[0])
65
66 else: del self.tabs[tabname]
67
68 self.buttons[tabname].pack_forget()
69 del self.buttons[tabname]
70
71
72 def switch_tab(self, name):

Callers 1

recipe-577261.pyFile · 0.45

Calls 3

switch_tabMethod · 0.95
pack_forgetMethod · 0.80
keysMethod · 0.45

Tested by

no test coverage detected