summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-09-19 08:12:55 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-09-19 08:12:55 (GMT)
commit01824bf50c2967c264b0fb4a13d08bb5c1d9665c (patch)
tree5f2226d7dc56e00b82015512ba04ce4f26c5064c /Lib
parent8eb92a014be020c99dad91ad2f7a8cbdcfa33d86 (diff)
downloadcpython-01824bf50c2967c264b0fb4a13d08bb5c1d9665c.zip
cpython-01824bf50c2967c264b0fb4a13d08bb5c1d9665c.tar.gz
cpython-01824bf50c2967c264b0fb4a13d08bb5c1d9665c.tar.bz2
Patch #484994: Improve PanedWindow.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/lib-tk/Tix.py24
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 ###
########################