]> granicus.if.org Git - python/commitdiff
Added {xview,yview}_{moveto,scroll} to the Canvas class.
authorBarry Warsaw <barry@python.org>
Tue, 13 Oct 1998 19:01:10 +0000 (19:01 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 13 Oct 1998 19:01:10 +0000 (19:01 +0000)
Lib/lib-tk/Tkinter.py

index 40b913d8bc11446de20be6d9e37ff9a82c5fef8b..4662f3b0f0d472edaf3287029c44037210f8abb7 100644 (file)
@@ -1298,10 +1298,18 @@ class Canvas(Widget):
                if not args:
                        return self._getdoubles(self.tk.call(self._w, 'xview'))
                self.tk.call((self._w, 'xview') + args)
+       def xview_moveto(self, fraction):
+               self.tk.call(self._w, 'xview', 'moveto', fraction)
+       def xview_scroll(self, number, what):
+               self.tk.call(self._w, 'xview', 'scroll', number, what)
        def yview(self, *args):
                if not args:
                        return self._getdoubles(self.tk.call(self._w, 'yview'))
                self.tk.call((self._w, 'yview') + args)
+       def yview_moveto(self, fraction):
+               self.tk.call(self._w, 'yview', 'moveto', fraction)
+       def yview_scroll(self, number, what):
+               self.tk.call(self._w, 'yview', 'scroll', number, what)
 
 class Checkbutton(Widget):
        def __init__(self, master=None, cnf={}, **kw):