Bogdanp / racket-gui-easy

Declarative GUIs in Racket.
https://docs.racket-lang.org/gui-easy/index.html
134 stars 18 forks source link

Scrolling list-views with the mouse #15

Open benknoble opened 2 years ago

benknoble commented 2 years ago

A quick glance at the racket/gui docs didn't get me too far, so: what would it take to make the view in list-view scrollable with the mouse (in addition to dragging the scrollbar)?

Is this a fundamental limitation of racket/gui that such things aren't supported automatically or even easily? Or is there a simple piece of plugin code that I can add as a mixin or even a PR here?

DrRacket's editor scrolls with the mouse, so I'm sure it must be possible. But if it's intrinsically difficult code, I can live without it.

Bogdanp commented 2 years ago

I've been planning to look into this for a bit, but haven't had time recently. The list-view uses racket/gui panels under the hood, and those don't support mouse scrolling. There's a way to get the scroll events, but I don't think there's a way to control the scroll position even if you're able to grab the events, so I think racket/gui itself needs to be updated to support this.

benknoble commented 2 years ago

Asked about this on Discourse to see if the core team or a racket/gui expert would weigh in: https://racket.discourse.group/t/scrolling-racket-gui-panels-with-the-mouse/957