Bind scroll events to a specific widget.
(self, widget)
| 227 | self._bind_scroll_to_widget(self) |
| 228 | |
| 229 | def _bind_scroll_to_widget(self, widget) -> None: |
| 230 | """Bind scroll events to a specific widget.""" |
| 231 | if platform.system() == "Linux": |
| 232 | widget.bind("<Button-4>", self._on_scroll_up, add="+") |
| 233 | widget.bind("<Button-5>", self._on_scroll_down, add="+") |
| 234 | else: |
| 235 | widget.bind("<MouseWheel>", self._on_mousewheel, add="+") |
| 236 | |
| 237 | def _on_mousewheel(self, event) -> None: |
| 238 | """Handle mouse wheel on Windows/macOS.""" |
no outgoing calls
no test coverage detected