From 4eaadf002ed7d4010f743855a4495940be7ccf28 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 13 Oct 1998 19:01:10 +0000 Subject: [PATCH] Added {xview,yview}_{moveto,scroll} to the Canvas class. --- Lib/lib-tk/Tkinter.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 40b913d8bc1..4662f3b0f0d 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -1298,10 +1298,18 @@ def xview(self, *args): 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):