gui
gui copied to clipboard
How to do drag and drop on any frame
For example, a file explorer will need drag and drop to move the file/directory. However, currently, I didn't see anything like this in racket/gui, this should available in GTK.
I don't believe you can do drag and drop within a frame with the normal GUI controls. If my understanding and recollection is correct, you need to use a pasteboard editor. Unfortunately, that means you need to manually implement all the controls, as snips, that you want to drag and drop, because the editors (text and pasteboard) do not support the other GUI controls. You can embed a text editor into an editor snip, which can then be placed on a pasteboard editor.
https://docs.racket-lang.org/gui/editor-overview.html
https://docs.racket-lang.org/gui/editor-snip_.html
It's complex. Here's a blog that has several demos and programs with the GUI toolkit: https://alex-hhh.github.io/index.html
Not sure, maybe bind outlineview from cocoa is better