MCPcopy Create free account
hub / github.com/CJackHwang/AIstudioProxyAPI / _bind_scroll_to_widget

Method _bind_scroll_to_widget

gui/utils.py:229–235  ·  view source on GitHub ↗

Bind scroll events to a specific widget.

(self, widget)

Source from the content-addressed store, hash-verified

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."""

Callers 2

add_itemMethod · 0.95
_bind_scroll_eventsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected