class ScrollableView(View)

A ScrollableView is a View with support for scrolling.

Properties

scrolling
A string containing 'h' to enable horizontal scrolling and 'v' to enable vertical scrolling.

hscrolling
True if horizontal scrolling is enabled.

vscrolling
True if vertical scrolling is enabled.

extent
Rectangle in local coordinates defining the limits of scrolling.

scroll_offset
Tuple (dx, dy) representing the difference in local coordinates between the top left corner of the view's bounds and the top left corner of the extent. Assigning to this property will cause the view to scroll. The value is clamped to the allowable scrolling range, as determined by the current bounds and extent.

line_scroll_amount
Tuple (dh, dv) representing the size of a "line" in each direction for scrolling purposes.

Methods

scroll_by(dx, dy)
Scrolls the view by the given horizontal and vertical amounts, within the limits defined by the extent.

scroll_line_left()
scroll_line_right()
scroll_line_up()
scroll_line_down()
Scrolls the view by one line in the specified direction, as determined by the line_scroll_amount property.

scroll_page_left()
scroll_page_right()
scroll_page_up()
scroll_page_down()
Scrolls the view by one page in the specified direction. The size of a page is equal to the size of the viewed rectangle minus the line_scroll_amount.
---