improved scrollbar delay behavior -- jvr

This commit is contained in:
Just van Rossum 1999-04-21 09:24:02 +00:00
parent 7ceb5777d7
commit eb67a7b980
1 changed files with 5 additions and 2 deletions

View File

@ -305,8 +305,11 @@ class Scrollbar(ControlWidget):
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: