From eb67a7b9809adac2767e808e36c75d5acbf59f66 Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Wed, 21 Apr 1999 09:24:02 +0000 Subject: [PATCH] improved scrollbar delay behavior -- jvr --- Mac/Tools/IDE/Wcontrols.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Mac/Tools/IDE/Wcontrols.py b/Mac/Tools/IDE/Wcontrols.py index c5511d4b601..7add904ff21 100644 --- a/Mac/Tools/IDE/Wcontrols.py +++ b/Mac/Tools/IDE/Wcontrols.py @@ -305,8 +305,11 @@ def click(self, point, modifiers): self._control.HiliteControl(part) self._hit(part) oldpart = part - import time - time.sleep(0.3) + # slight delay before scrolling at top speed... + now = Evt.TickCount() + while Evt.StillDown(): + if (Evt.TickCount() - now) > 18: # 0.3 seconds + break while Evt.StillDown(): part = self._control.TestControl(point) if part == oldpart: