mirror of https://github.com/kivy/kivy.git
document scrollview generic events
This commit is contained in:
parent
c2815a0634
commit
d48c94faca
|
@ -135,6 +135,18 @@ if Config:
|
|||
class ScrollView(StencilView):
|
||||
'''ScrollView class. See module documentation for more information.
|
||||
|
||||
:Events:
|
||||
`on_scroll_start`
|
||||
Generic event fired when scrolling starts from touch.
|
||||
`on_scroll_move`
|
||||
Generic event fired when scrolling move from touch.
|
||||
`on_scroll_stop`
|
||||
Generic event fired when scrolling stops from touch.
|
||||
|
||||
.. versionchanged:: 1.9.0
|
||||
`on_scroll_start`, `on_scroll_move` and `on_scroll_stop` events are
|
||||
now dispatched when scrolling to handle nested ScrollViews.
|
||||
|
||||
.. versionchanged:: 1.7.0
|
||||
`auto_scroll`, `scroll_friction`, `scroll_moves`, `scroll_stoptime' has
|
||||
been deprecated, use :attr:`effect_cls` instead.
|
||||
|
@ -416,6 +428,8 @@ class ScrollView(StencilView):
|
|||
value.bind(size=self._set_viewport_size)
|
||||
self.viewport_size = value.size
|
||||
|
||||
__events__ = ('on_scroll_start', 'on_scroll_move', 'on_scroll_stop')
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self._touch = None
|
||||
self._trigger_update_from_scroll = Clock.create_trigger(
|
||||
|
|
Loading…
Reference in New Issue