| 9 | """ |
| 10 | |
| 11 | class ScrollApp(App): |
| 12 | CSS = """ |
| 13 | Screen { |
| 14 | overflow: scroll; |
| 15 | } |
| 16 | Container { |
| 17 | width: 200vw; |
| 18 | } |
| 19 | #hello { |
| 20 | width: 20; |
| 21 | height: 10; |
| 22 | offset: 50 10; |
| 23 | background: blue; |
| 24 | color: white; |
| 25 | } |
| 26 | """ |
| 27 | |
| 28 | def compose(self) -> ComposeResult: |
| 29 | with Container(): |
| 30 | yield Static("Hello", id="hello") |
| 31 | |
| 32 | def on_mount(self) -> None: |
| 33 | self.screen.scroll_to(20, 0, animate=False) |
| 34 | |
| 35 | app = ScrollApp() |
| 36 | async with app.run_test() as pilot: |
no outgoing calls
searching dependent graphs…