[5.70b1, Qt] Drag and drop problems

Post bugreports for the Linux version here
wombats
Enthusiast
Enthusiast
Posts: 664
Joined: Thu Dec 29, 2011 5:03 pm

[5.70b1, Qt] Drag and drop problems

Post by wombats »

There seems to be a problem with initiating a drag operation...it often takes two or three goes to get the gadget to respond to the drag.

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
Fred
Administrator
Administrator
Posts: 16664
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [5.70b1, Qt] Drag and drop problems

Post by Fred »

Fixed EventDropPrivate(), Tree still still have issue.
Post Reply