Version

Quick search

Scroll effect

New in version 1.7.0.

Based on the kinetic effect, the ScrollEffect will limit the movement to bounds determined by its min and max properties. If the movement exceeds these bounds, it will calculate the amount of overscroll and try to return to the value of one of the bounds.

This is very useful for implementing a scrolling list. We actually use this class as a base effect for our ScrollView widget.

class kivy.effects.scroll.ScrollEffect(**kwargs)

Bases: kivy.effects.kinetic.KineticEffect

ScrollEffect class. See the module documentation for more information.

reset(pos)

(internal) Reset the value and the velocity to the pos. Mostly used when the bounds are checked.

start(val, t=None)

Start the movement.

Parameters:
val: float or int

Value of the movement

t: float, defaults to None

Time when the movement happen. If no time is set, it will use time.time()

stop(val, t=None)

Stop the movement.

See start() for the arguments.

update(val, t=None)

Update the movement.

See start() for the arguments.