massung
2021-6-20 12:37:17

Wanted to post about the package I just published in case any one else would find it useful:

https://pkgd.racket-lang.org/pkgn/package/canvas-list

It’s a port of a GUI control I made for LispWorks back in the day. It’s a subclass of canvas% used to render very large lists of items quickly with custom rendering. It has support for:

• single selection and mouse hover • keyboard and mouse navigation • double-click actions and right-click context actions • alternating row state • primary key indexing (for sorting and filtering w/o losing original items/order) And here’s a sample screenshot using it to view Hacker News: https://raw.githubusercontent.com/massung/racket-canvas-list/master/images/hn.png

If you find it useful, awesome. And if you find a bug, please post an issue so I can fix it. :wink:


massung
2021-6-20 12:39:11

Note: FYI, in the screenshot, both the left and right panes are canvas-list% controls, showing how you can do whatever for rendering each item.


soegaard2
2021-6-20 12:39:45

Looks great. You really ought to put a screenshot in the documentation :slightly_smiling_face:


soegaard2
2021-6-20 12:39:57

Don’t forget to post a link to http://racket-stories.com\|racket-stories.com.


massung
2021-6-20 12:42:42

Never figured out the screenshots in scribble. I’m just heading out now to the airport. Was trying to post quickly. Feel free to tell racket stories for me :)


soegaard2
2021-6-20 12:45:59