summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/tix.py
diff options
context:
space:
mode:
authorGuilherme Polo <ggpolo@gmail.com>2009-08-14 15:05:30 (GMT)
committerGuilherme Polo <ggpolo@gmail.com>2009-08-14 15:05:30 (GMT)
commit1fff00832639082d2d7aa354c8e6d9110171d6bc (patch)
tree969c400d839ce118c879c0537cd93065c24fe518 /Lib/tkinter/tix.py
parent6837083582176067868d1cc60772ef9de6ef6bd3 (diff)
downloadcpython-1fff00832639082d2d7aa354c8e6d9110171d6bc.zip
cpython-1fff00832639082d2d7aa354c8e6d9110171d6bc.tar.gz
cpython-1fff00832639082d2d7aa354c8e6d9110171d6bc.tar.bz2
Merged revisions 74446-74449 via svnmerge from
svn+ssh://pythondev/python/trunk ........ r74446 | guilherme.polo | 2009-08-14 10:53:41 -0300 (Fri, 14 Aug 2009) | 1 line Issue #3344: Replace itertools.count by enumerate. ........ r74447 | guilherme.polo | 2009-08-14 11:03:07 -0300 (Fri, 14 Aug 2009) | 1 line Issue #3926: Fix the usage of the new showwarnings and formatwarning. ........ r74448 | guilherme.polo | 2009-08-14 11:36:45 -0300 (Fri, 14 Aug 2009) | 3 lines Issue #1135: Add the XView and YView mix-ins to avoid duplicating the xview* and yview* methods. ........ r74449 | guilherme.polo | 2009-08-14 11:43:43 -0300 (Fri, 14 Aug 2009) | 1 line Clarifying Entry.selection_present's docstring. ........
Diffstat (limited to 'Lib/tkinter/tix.py')
-rw-r--r--Lib/tkinter/tix.py34
1 files changed, 3 insertions, 31 deletions
diff --git a/Lib/tkinter/tix.py b/Lib/tkinter/tix.py
index 3bfa539..0c8ca68 100644
--- a/Lib/tkinter/tix.py
+++ b/Lib/tkinter/tix.py
@@ -850,7 +850,7 @@ class FileEntry(TixWidget):
# FIXME: return python object
pass
-class HList(TixWidget):
+class HList(TixWidget, XView, YView):
"""HList - Hierarchy display widget can be used to display any data
that have a hierarchical structure, for example, file system directory
trees. The list entries are indented and connected by branch lines
@@ -1037,12 +1037,6 @@ class HList(TixWidget):
def show_entry(self, entry):
return self.tk.call(self._w, 'show', 'entry', entry)
- def xview(self, *args):
- self.tk.call(self._w, 'xview', *args)
-
- def yview(self, *args):
- self.tk.call(self._w, 'yview', *args)
-
class InputOnly(TixWidget):
"""InputOnly - Invisible widget. Unix only.
@@ -1419,7 +1413,7 @@ class StdButtonBox(TixWidget):
if name in self.subwidget_list:
self.tk.call(self._w, 'invoke', name)
-class TList(TixWidget):
+class TList(TixWidget, XView, YView):
"""TList - Hierarchy display widget which can be
used to display data in a tabular format. The list entries of a TList
widget are similar to the entries in the Tk listbox widget. The main
@@ -1502,12 +1496,6 @@ class TList(TixWidget):
def selection_set(self, first, last=None):
self.tk.call(self._w, 'selection', 'set', first, last)
- def xview(self, *args):
- self.tk.call(self._w, 'xview', *args)
-
- def yview(self, *args):
- self.tk.call(self._w, 'yview', *args)
-
class Tree(TixWidget):
"""Tree - The tixTree widget can be used to display hierachical
data in a tree form. The user can adjust
@@ -1777,7 +1765,7 @@ class CObjView(TixWidget):
pass
-class Grid(TixWidget):
+class Grid(TixWidget, XView, YView):
'''The Tix Grid command creates a new window and makes it into a
tixGrid widget. Additional options, may be specified on the command
line or in the option database to configure aspects such as its cursor
@@ -1865,22 +1853,6 @@ class Grid(TixWidget):
# def size dim index ?option value ...?
# def unset x y
- def xview(self):
- return self._getdoubles(self.tk.call(self, 'xview'))
- def xview_moveto(self, fraction):
- self.tk.call(self,'xview', 'moveto', fraction)
- def xview_scroll(self, count, what="units"):
- "Scroll right (count>0) or left <count> of units|pages"
- self.tk.call(self, 'xview', 'scroll', count, what)
-
- def yview(self):
- return self._getdoubles(self.tk.call(self, 'yview'))
- def yview_moveto(self, fraction):
- self.tk.call(self,'ysview', 'moveto', fraction)
- def yview_scroll(self, count, what="units"):
- "Scroll down (count>0) or up <count> of units|pages"
- self.tk.call(self, 'yview', 'scroll', count, what)
-
class ScrolledGrid(Grid):
'''Scrolled Grid widgets'''