diff options
Diffstat (limited to 'Lib/lib-tk')
-rwxr-xr-x | Lib/lib-tk/Tix.py | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/Lib/lib-tk/Tix.py b/Lib/lib-tk/Tix.py index 3b15d6c..055f43d 100755 --- a/Lib/lib-tk/Tix.py +++ b/Lib/lib-tk/Tix.py @@ -1047,10 +1047,11 @@ class ListNoteBook(TixWidget): choosing the name of the desired page in the hlist subwidget.""" def __init__(self, master, cnf={}, **kw): - TixWidget.__init__(self, master, 'tixDirList', ['options'], cnf, kw) - self.subwidget_list['hlist'] = _dummyHList(self, 'hlist') - self.subwidget_list['shlist'] = _dummyScrolledHList(self, 'vsb') - + TixWidget.__init__(self, master, 'tixListNoteBook', ['options'], cnf, kw) + self.subwidget_list['pane'] = _dummyPanedWindow(self, 'pane', + destroy_physically=0) + self.subwidget_list['hlist'] = _dummyHList(self, 'hlist') + self.subwidget_list['shlist'] = _dummyScrolledHList(self, 'vsb') def add(self, name, cnf={}, **kw): apply(self.tk.call, @@ -1058,6 +1059,17 @@ class ListNoteBook(TixWidget): self.subwidget_list[name] = TixSubWidget(self, name) return self.subwidget_list[name] + def page(self, name): + return self.subwidget(name) + + def pages(self): + # Can't call subwidgets_all directly because we don't want .nbframe + names = self.tk.split(self.tk.call(self._w, 'pages')) + ret = [] + for x in names: + ret.append(self.subwidget(x)) + return ret + def raise_page(self, name): # raise is a python keyword self.tk.call(self._w, 'raise', name) @@ -1594,6 +1606,10 @@ class _dummyNoteBookFrame(NoteBookFrame, TixSubWidget): def __init__(self, master, name, destroy_physically=0): TixSubWidget.__init__(self, master, name, destroy_physically) +class _dummyPanedWindow(PanedWindow, TixSubWidget): + def __init__(self, master, name, destroy_physically=1): + TixSubWidget.__init__(self, master, name, destroy_physically) + ######################## ### Utility Routines ### ######################## |