EventDropPrivate() doesn't work.
Finally, freak's TreeGadget drag and drop example doesn't work: viewtopic.php?p=206014#p206014
Code: Select all
Enumeration
#Window
#Tree1
#Tree2
#TreeDragType
EndEnumeration
OpenWindow(#Window, 0, 0, 430, 400, "", #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_ScreenCentered)
TreeGadget(#Tree1, 10, 10, 200, WindowHeight(#Window) - 20)
TreeGadget(#Tree2, GadgetX(#Tree1) + GadgetWidth(#Tree1) + 10, 10, 200, WindowHeight(#Window) - 20)
For i = 0 To 5
AddGadgetItem(#Tree1, -1, "Item")
Next
EnableGadgetDrop(#Tree2, #PB_Drop_Private, #PB_Drag_Copy, #TreeDragType)
Repeat
event = WaitWindowEvent()
Select event
Case #PB_Event_Gadget
If EventType() = #PB_EventType_DragStart And EventGadget() = #Tree1
DragPrivate(#TreeDragType, #PB_Drag_Copy)
EndIf
Case #PB_Event_GadgetDrop
If EventDropPrivate() = #TreeDragType
AddGadgetItem(#Tree2, -1, "Item")
EndIf
Case #PB_Event_CloseWindow
End
EndSelect
ForEver