Example

This example places three rectangles in a custom container which scrolls its child widgets to the left when the user clicks on the stage.

Real-world applications will of course want to implement more specific behaviour, depending on their needs. For instance, adding scrollbars that show accurate scroll positions, scrolling smoothly with animation, efficiently drawing only objects that should be visible when dealing with large numbers of rows.

Figure B.1. Scrolling Container

Scrolling Container

Source Code