Hi,
having ripped my prog apart wondering why drag/drop was so slow with a ListIcon with lots of rows, have decided that this is a PB problem. Unsure if this is a bug though?
Opinions welcomed before I post a bug report.
Basically, if you drag some text (from any source) and drag over a listicon, then PB's drag/drop lib takes steps to highlight the drag position etc. All well and good (though I wish I could turn this off as it gets in the way).
All good until you drag over a listicon with lots of rows.
Try the following, drag from either listicon (the drag text is actually just some dummy text) and mouse over the left listicon. You'll see that the highlighted row is displayed nicely... no lag.
Now drag over the right listicon. Very slow... at least on my system.
Code: Select all
OpenWindow(0,0,0,480,400,"",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
TextGadget(10, 20, 20, 200, 40, "Drag over this gadget... no probs!")
ListIconGadget(0,20,60,200,300, "Drag from/to", 195, #PB_ListIcon_FullRowSelect)
TextGadget(11, 250, 20, 200, 40, "Drag over this gadget... SLOW!")
ListIconGadget(1,250,60,200,300,"Drag from/to", 195, #PB_ListIcon_FullRowSelect)
For i = 0 To 50
AddGadgetItem(0, -1, "Row "+Str(i))
Next
For i = 0 To 5000
AddGadgetItem(1, -1, "Row "+Str(i))
Next
EnableGadgetDrop(0, #PB_Drop_Text, #PB_Drag_Copy)
EnableGadgetDrop(1, #PB_Drop_Text, #PB_Drag_Copy)
Repeat
eventID = WaitWindowEvent()
Select eventID
Case #PB_Event_GadgetDrop
If EventGadget() =1
AddGadgetItem(EventGadget(), GetGadgetState(EventGadget()), EventDropText())
EndIf
Case #PB_Event_Gadget
If EventType() = #PB_EventType_DragStart
DragText("TEST!")
EndIf
EndSelect
Until eventID = #PB_Event_CloseWindow
It is playing merry buggery with my program.
Thanks.

