Table Of Contents
Scroll effect¶
New in version 1.7.0.
Based on the kinetic, the ScrollEffect will limit the movement to bounds, determined by min and max. If the movement is going outside of the bounds, it will calculate the amount of overscroll, and try to get back the value to one of the bounds.
This is very useful for implementing scrolling list. We actually use that 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 informations.
- displacement¶
Cumulative distance of the movement, during the interaction. This is used to determine if the movemenent is a drag (more than drag_threshold) or not.
displacement is a NumericProperty, default to 0
- drag_threshold¶
Minimum distance to travel until the movement is considered as a drag.
velocity is a NumericProperty, default to 20sp
- max¶
Maximum boundary to use for scrolling.
max is a NumericProperty, default to 0
- min¶
Minimum boundary to use for scrolling.
min is a NumericProperty, default to 0
- overscroll¶
Computed value when the user over-scroll = going out of the bounds.
overscroll is a NumericProperty, default to 0
- reset(pos)¶
(internal) Reset the value and the velocity to the pos. Mostly used when the bounds are checked.
- scroll¶
Computed value for scrolling. This is different that value, this one will go back to one of the bounds instead.
scroll is a NumericProperty, default to 0
- target_widget¶
Widget to attach to this effect. Even if this class doesn’t do any change by default on the target_widget, subclass can change the graphics or apply custom transformation.
target_widget is a ObjectProperty, default to None.