gui icon indicating copy to clipboard operation
gui copied to clipboard

How to do drag and drop on any frame

Open dannypsnl opened this issue 3 years ago • 2 comments

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.

dannypsnl avatar Nov 06 '21 18:11 dannypsnl

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

bmitc avatar Jan 12 '22 02:01 bmitc

Not sure, maybe bind outlineview from cocoa is better

dannypsnl avatar Jan 12 '22 03:01 dannypsnl