ScrollEvent
- class ScrollEvent(*args, **kwargs)
Superclasses: Event
An event related to a scrolling motion.
Methods
- class ScrollEvent
- get_deltas() tuple[float, float]
Extracts the scroll deltas of a scroll event.
The deltas will be zero unless the scroll direction is
SMOOTH
.For the representation unit of these deltas, see
get_unit
.
- get_direction() ScrollDirection
Extracts the direction of a scroll event.
- get_unit() ScrollUnit
Extracts the scroll delta unit of a scroll event.
The unit will always be
WHEEL
if the scroll direction is notSMOOTH
.Added in version 4.8.
- is_stop() bool
Check whether a scroll event is a stop scroll event.
Scroll sequences with smooth scroll information may provide a stop scroll event once the interaction with the device finishes, e.g. by lifting a finger. This stop scroll event is the signal that a widget may trigger kinetic scrolling based on the current velocity.
Stop scroll events always have a delta of 0/0.