summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-10-13 19:01:10 (GMT)
committerBarry Warsaw <barry@python.org>1998-10-13 19:01:10 (GMT)
commit4eaadf002ed7d4010f743855a4495940be7ccf28 (patch)
tree119001504a58b51ffe073de3502ccfbcc54fb73c /Lib/lib-tk
parent423938a852a8faffea07840d7d9b5965c5d165bd (diff)
downloadcpython-4eaadf002ed7d4010f743855a4495940be7ccf28.zip
cpython-4eaadf002ed7d4010f743855a4495940be7ccf28.tar.gz
cpython-4eaadf002ed7d4010f743855a4495940be7ccf28.tar.bz2
Added {xview,yview}_{moveto,scroll} to the Canvas class.
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r--Lib/lib-tk/Tkinter.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 40b913d..4662f3b 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -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):