No Drag&Drop on Scintilla gadgets?

Just starting out? Need help? Post your questions and find answers here.
Jedive
User
User
Posts: 36
Joined: Sun Jun 29, 2003 11:56 am
Location: Spain

No Drag&Drop on Scintilla gadgets?

Post 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.
==Jedive==
MacBook Core Duo 2Ghz, 2GB, Intel GMA950, Leopard
Celeron M 1.5, 512MB, Intel 915GM, WinXP/DX9, Ubuntu
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post 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.
I may look like a mule, but I'm not a complete ass.
Jedive
User
User
Posts: 36
Joined: Sun Jun 29, 2003 11:56 am
Location: Spain

Post by Jedive »

Done :)
==Jedive==
MacBook Core Duo 2Ghz, 2GB, Intel GMA950, Leopard
Celeron M 1.5, 512MB, Intel 915GM, WinXP/DX9, Ubuntu
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: No Drag&Drop on Scintilla gadgets?

Post 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.
Post Reply