summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2003-01-10 23:24:32 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2003-01-10 23:24:32 (GMT)
commite931ed59d3d39cfbf91255a77f7fc64bfd167deb (patch)
tree24587ede06bc62a38e594b50132faafc06ec8441 /Lib/lib-tk
parentfaa7b9bb4ca19f4cf07b1faacbe794af893a3e2d (diff)
downloadcpython-e931ed59d3d39cfbf91255a77f7fc64bfd167deb.zip
cpython-e931ed59d3d39cfbf91255a77f7fc64bfd167deb.tar.gz
cpython-e931ed59d3d39cfbf91255a77f7fc64bfd167deb.tar.bz2
Fix SF bug # 602259, 3rd parameter for Tkinter.scan_dragto
Add the optional gain parameter and pass it to Tk.
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r--Lib/lib-tk/Tkinter.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 833aad5..de41bdc 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -2139,11 +2139,11 @@ class Canvas(Widget):
def scan_mark(self, x, y):
"""Remember the current X, Y coordinates."""
self.tk.call(self._w, 'scan', 'mark', x, y)
- def scan_dragto(self, x, y):
- """Adjust the view of the canvas to 10 times the
+ def scan_dragto(self, x, y, gain=10):
+ """Adjust the view of the canvas to GAIN times the
difference between X and Y and the coordinates given in
scan_mark."""
- self.tk.call(self._w, 'scan', 'dragto', x, y)
+ self.tk.call(self._w, 'scan', 'dragto', x, y, gain)
def select_adjust(self, tagOrId, index):
"""Adjust the end of the selection near the cursor of an item TAGORID to index."""
self.tk.call(self._w, 'select', 'adjust', tagOrId, index)