Kaydet (Commit) e931ed59 authored tarafından Neal Norwitz's avatar Neal Norwitz

Fix SF bug # 602259, 3rd parameter for Tkinter.scan_dragto

Add the optional gain parameter and pass it to Tk.
üst faa7b9bb
...@@ -2139,11 +2139,11 @@ class Canvas(Widget): ...@@ -2139,11 +2139,11 @@ class Canvas(Widget):
def scan_mark(self, x, y): def scan_mark(self, x, y):
"""Remember the current X, Y coordinates.""" """Remember the current X, Y coordinates."""
self.tk.call(self._w, 'scan', 'mark', x, y) self.tk.call(self._w, 'scan', 'mark', x, y)
def scan_dragto(self, x, y): def scan_dragto(self, x, y, gain=10):
"""Adjust the view of the canvas to 10 times the """Adjust the view of the canvas to GAIN times the
difference between X and Y and the coordinates given in difference between X and Y and the coordinates given in
scan_mark.""" 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): def select_adjust(self, tagOrId, index):
"""Adjust the end of the selection near the cursor of an item TAGORID to 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) self.tk.call(self._w, 'select', 'adjust', tagOrId, index)
......
...@@ -88,6 +88,9 @@ Library ...@@ -88,6 +88,9 @@ Library
- urlparse can now parse imap:// URLs. See SF feature request #618024. - urlparse can now parse imap:// URLs. See SF feature request #618024.
- Tkinter.Canvas.scan_dragto() provides an optional parameter to support
the gain value which is passed to Tk. SF bug# 602259.
Tools/Demos Tools/Demos
----------- -----------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment