Will try it later.
Off to work

Code: Select all
Structure PB_Sender
hwnd.l ;
message.l ;
mousex.l ; Client co-ordinates relative to the underlying control (not the parent window)
mousey.l ; Client co-ordinates relative to the underlying control (not the parent window)
button.l ; For click events this indicates which mouse button was clicked etc.
; #EVENT_LEFTBUTTON etc.
item.l ; Used with certain events \ controls to indicate a particular item.
state.l ; Gives extra information for certain events.
text$ ; Gives extra information for certain events.
uMsg.l ; Windows callback message parameter (when appropriate)
wParam.l ; Windows callback message parameter (when appropriate)
lParam.l ; Windows callback message parameter (when appropriate)
userData1.l ; *
userData2.l ; * UserData - For user private use.
userData3.l ; *
EndStructure
i've written a small demo for multiselection.Flype wrote:is it possible to drag'n'drop more than one items at once between two listicons (with the flag #PB_ListIcon_MultiSelect) ?
Code: Select all
XIncludeFile "EasyVENT.pbi" : DisableExplicit
Declare.l DragItem(*sender.PB_Sender)
Declare.l DropItem(*sender.PB_Sender)
;-
;-
Enumeration 1
#gStore
#gBasket
EndEnumeration
If OpenWindow(0, 100, 100, 350, 320, "MultiSelect Drag'n'Drop", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
LoadImage(0, "icon.ico")
If CreateGadgetList(WindowID(0))
ListIconGadget(#gStore, 10, 10, 160, 300, "Store", 150, #PB_ListIcon_FullRowSelect|#PB_ListIcon_MultiSelect)
ListIconGadget(#gBasket, 180, 10, 160, 300, "Basket", 150, #PB_ListIcon_FullRowSelect|#PB_ListIcon_MultiSelect)
SetGadgetColor(#gStore, #PB_Gadget_BackColor, (#Green|$DFDFDF))
SetGadgetColor(#gBasket, #PB_Gadget_BackColor, (#Blue |$DFDFDF))
EndIf
For i = 1 To 15
AddGadgetItem(#gStore, -1, StringField("Apple,Apricot,Banana,Blackberry,Cherry,Grape,Kiwi,Lemon,Mango,Orange,Peach,Pear,Pineapple,Strawberry,Vanilla", i, ","), ImageID(0))
Next
SetEventHandler(GadgetID(#gStore), #OnDragItemStart, @DragItem())
SetEventHandler(GadgetID(#gStore), #OnDragItemEnd, @DropItem())
SetEventHandler(GadgetID(#gBasket), #OnDragItemStart, @DragItem())
SetEventHandler(GadgetID(#gBasket), #OnDragItemEnd, @DropItem())
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
;-
;-
Procedure.l DragItem(*sender.PB_Sender)
Protected i.l, a.l = GetDlgCtrlID_(*sender\hwnd)
For i = 0 To CountGadgetItems(a) - 1
If GetGadgetItemState(a, i) & #PB_ListIcon_Selected
*sender\text$ + GetGadgetItemText(a, i, 0) + ", "
EndIf
Next
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
Procedure.l DropItem(*sender.PB_Sender)
Protected i.l, a.l = #gStore, b.l = #gBasket
If *sender\hwnd = GadgetID(#gStore) : Swap a, b : EndIf
For i = CountGadgetItems(a) - 1 To 0 Step -1
If GetGadgetItemState(a, i) & #PB_ListIcon_Selected
AddGadgetItem(b, -1, GetGadgetItemText(a, i, 0), ImageID(0))
RemoveGadgetItem(a, i)
EndIf
Next
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
I am just trying to run one of the demos (have tried to get several going) running.Fangbeast wrote:G'day. You put the EasyVent stuff in the same directory as the application you are developing. Or modify any IncludFile directives in your code and the EasyVent files to point to the right directories that all the files are in.