Patch #484994: Improve PanedWindow.
This commit is contained in:
parent
8eb92a014b
commit
01824bf50c
|
@ -1047,10 +1047,11 @@ class ListNoteBook(TixWidget):
|
||||||
choosing the name of the desired page in the hlist subwidget."""
|
choosing the name of the desired page in the hlist subwidget."""
|
||||||
|
|
||||||
def __init__(self, master, cnf={}, **kw):
|
def __init__(self, master, cnf={}, **kw):
|
||||||
TixWidget.__init__(self, master, 'tixDirList', ['options'], cnf, kw)
|
TixWidget.__init__(self, master, 'tixListNoteBook', ['options'], cnf, kw)
|
||||||
self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
|
self.subwidget_list['pane'] = _dummyPanedWindow(self, 'pane',
|
||||||
self.subwidget_list['shlist'] = _dummyScrolledHList(self, 'vsb')
|
destroy_physically=0)
|
||||||
|
self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
|
||||||
|
self.subwidget_list['shlist'] = _dummyScrolledHList(self, 'vsb')
|
||||||
|
|
||||||
def add(self, name, cnf={}, **kw):
|
def add(self, name, cnf={}, **kw):
|
||||||
apply(self.tk.call,
|
apply(self.tk.call,
|
||||||
|
@ -1058,6 +1059,17 @@ class ListNoteBook(TixWidget):
|
||||||
self.subwidget_list[name] = TixSubWidget(self, name)
|
self.subwidget_list[name] = TixSubWidget(self, name)
|
||||||
return self.subwidget_list[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
|
def raise_page(self, name): # raise is a python keyword
|
||||||
self.tk.call(self._w, 'raise', name)
|
self.tk.call(self._w, 'raise', name)
|
||||||
|
|
||||||
|
@ -1594,6 +1606,10 @@ class _dummyNoteBookFrame(NoteBookFrame, TixSubWidget):
|
||||||
def __init__(self, master, name, destroy_physically=0):
|
def __init__(self, master, name, destroy_physically=0):
|
||||||
TixSubWidget.__init__(self, master, name, destroy_physically)
|
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 ###
|
### Utility Routines ###
|
||||||
########################
|
########################
|
||||||
|
|
Loading…
Reference in New Issue