Delete a tab from the notebook, as well as it's corresponding frame
(self, tab)
| 103 | return self.tabVars[temp][1] #Return a frame to be used as a parent to other widgets |
| 104 | |
| 105 | def destroy_tab(self, tab): |
| 106 | """Delete a tab from the notebook, as well as it's corresponding frame |
| 107 | |
| 108 | """ |
| 109 | |
| 110 | self.iteratedTabs = 0 #Keep track of the number of loops made |
| 111 | for b in self.tabVars.values(): #Iterate through the dictionary of tabs |
| 112 | if b[1] == tab: #Find the NumID of the given tab |
| 113 | b[0].destroy() #Destroy the tab's frame, along with all child widgets |
| 114 | self.tabs -= 1 #Subtract one from the tab count |
| 115 | self.deletedTabs.append(self.iteratedTabs) #Apend the NumID of the given tab to the list of deleted tabs |
| 116 | break #Job is done, exit the loop |
| 117 | self.iteratedTabs += 1 #Add one to the loop count |
| 118 | |
| 119 | def focus_on(self, tab): |
| 120 | """Locate the IDNum of the given tab and use |