Page 1 of 1

No Drag&Drop on Scintilla gadgets?

Posted: Sun Oct 12, 2008 12:24 pm
by Jedive
I am writing a simple IDE in PureBasic 4.20 using the built-in Scintilla library under Windows, and while using EnableWindowDrop(win, #PB_Drop_Files, #PB_Drag_Copy) seems to enable dropping files on the window, EnableGadgetDrop(gadget, #PB_Drop_Files, #PB_Drag_Copy) does not seem to enable it on the Scintilla gadget, which covers most part of the window. The bad thing about this is that dropping files only work when I drop it on the tool or status bar, being disabled on all the editing area. Same problem seems to happen if instead of a Scintilla gadget I use a EditorGadget.

Posted: Sun Oct 12, 2008 1:09 pm
by srod
Seems like a bug since if I use Win api directly (#WM_DROPFILES), I can drop files on both an editor gadget and a Scintilla gadget.

It seems that neither gadget is firing #PB_Event_GadgetDrop when files are being dropped.

Make a posting in the bug section linking back to this thread.

Posted: Sun Oct 12, 2008 6:12 pm
by Jedive
Done :)

Re: No Drag&Drop on Scintilla gadgets?

Posted: Fri Feb 24, 2012 5:10 pm
by Tenaja
Has this "bug" been fixed? Has anybody gotten drag/drop files onto Scintilla to work?

I tried enabling drop with both EnableGadgetDrop and EnableWindowDrop, and it just seems to disable the text drop, and everything I have tried gives me the slashed O when dragging a file. I have tried these combinations:
EnableWindowDrop(#WIN1, #PB_Drop_Files, #PB_Drag_Copy)
EnableGadgetDrop(0, #PB_Drop_Files, #PB_Drag_Copy)

I have also tried with multiple actions to no avail.

The Scintilla docs say it dropping files is only supported with GTK, but I don't know what version is implemented in Windows, and I need a cross-platform solution. A search only shows outdated info that did not implement. I did get an outdated sample to execute, but the drop never fired the Event. Any help would be appreciated.

Thanks.