Internal Function
(self, IDNum)
| 74 | self.noteBook.grid(row = 1, column = 0, columnspan = 27) |
| 75 | |
| 76 | def change_tab(self, IDNum): |
| 77 | """Internal Function""" |
| 78 | |
| 79 | for i in (a for a in range(0, len(self.tabVars.keys()))): |
| 80 | if not i in self.deletedTabs: #Make sure tab hasen't been deleted |
| 81 | if i <> IDNum: #Check to see if the tab is the one that is currently selected |
| 82 | self.tabVars[i][1].grid_remove() #Remove the Frame corresponding to each tab that is not selected |
| 83 | self.tabVars[i][0]['relief'] = self.inactiverelief #Change the relief of all tabs that are not selected to "Groove" |
| 84 | self.tabVars[i][0]['fg'] = self.inactivefg #Set the fg of the tab, showing it is selected, default is black |
| 85 | else: #When on the tab that is currently selected... |
| 86 | self.tabVars[i][1].grid() #Re-grid the frame that corresponds to the tab |
| 87 | self.tabVars[IDNum][0]['relief'] = self.activerelief #Change the relief to "Raised" to show the tab is selected |
| 88 | self.tabVars[i][0]['fg'] = self.activefg #Set the fg of the tab, showing it is not selected, default is black |
| 89 | |
| 90 | def add_tab(self, width = 2, **kw): |
| 91 | """Creates a new tab, and returns it's corresponding frame |