ivanomonti Expert Licensed User Longtime User Apr 25, 2020 #1 I created this agenda of mine where I'm finishing thanks to the whole community and the fantastic B4J but I'm still missing two aspects of Drag & Drop which is partly ok. Scenario item (buttons) scattered, when I pass over to do the Drag&Drop and can I intercept the properties of the object in question? as selected object contains some vlori that I have to recover (list) in order to copy the document with the DragDrop in the right folder! (each button has its own id and its archive folders, see image below).
I created this agenda of mine where I'm finishing thanks to the whole community and the fantastic B4J but I'm still missing two aspects of Drag & Drop which is partly ok. Scenario item (buttons) scattered, when I pass over to do the Drag&Drop and can I intercept the properties of the object in question? as selected object contains some vlori that I have to recover (list) in order to copy the document with the DragDrop in the right folder! (each button has its own id and its archive folders, see image below).
stevel05 Expert Licensed User Longtime User Apr 25, 2020 #2 You would need to make each object a drag target which would then call the DragEntered and DragOver event subs and get the target from the DragEvent Object and just ignore the drop event if it is accidentally dropped in the wrong place. Upvote 0
You would need to make each object a drag target which would then call the DragEntered and DragOver event subs and get the target from the DragEvent Object and just ignore the drop event if it is accidentally dropped in the wrong place.
ivanomonti Expert Licensed User Longtime User Apr 25, 2020 #3 stevel05 said: You would need to make each object a drag target which would then call the DragEntered and DragOver event subs and get the target from the DragEvent Object and just ignore the drop event if it is accidentally dropped in the wrong place. Click to expand... senary: I drag the document on the Maria button, the Maria button has an id, the same id is the name of the Maria folder where inside there are subfolders (documents, photos, videos). so you generate a path like ...\123451\foto\ ...\123451\video\ ...\123451\documenti\ now it all works when I do the dropo with a constant, but in my case for each button I have a variable that is id When passing the Drag&Drop is it possible to recognize object (button) and take its Tag? Upvote 0
stevel05 said: You would need to make each object a drag target which would then call the DragEntered and DragOver event subs and get the target from the DragEvent Object and just ignore the drop event if it is accidentally dropped in the wrong place. Click to expand... senary: I drag the document on the Maria button, the Maria button has an id, the same id is the name of the Maria folder where inside there are subfolders (documents, photos, videos). so you generate a path like ...\123451\foto\ ...\123451\video\ ...\123451\documenti\ now it all works when I do the dropo with a constant, but in my case for each button I have a variable that is id When passing the Drag&Drop is it possible to recognize object (button) and take its Tag?
stevel05 Expert Licensed User Longtime User Apr 25, 2020 #4 The DragEvent GetEventTarget method should return the object the drag is currently over, so: e.GetEventTarget Assuming they are all buttons Try B4X: Copy Dim Btn As Button = e.GetEventTarget Log(Btn.Tag) Upvote 0
The DragEvent GetEventTarget method should return the object the drag is currently over, so: e.GetEventTarget Assuming they are all buttons Try B4X: Copy Dim Btn As Button = e.GetEventTarget Log(Btn.Tag)
ivanomonti Expert Licensed User Longtime User Apr 25, 2020 #5 stevel05 said: The DragEvent GetEventTarget method should return the object the drag is currently over, so: e.GetEventTarget Try B4X: Copy Dim Btn As Button = e.GetEventTarget Log(Btn.Tag) Click to expand... thank 10000 Upvote 0
stevel05 said: The DragEvent GetEventTarget method should return the object the drag is currently over, so: e.GetEventTarget Try B4X: Copy Dim Btn As Button = e.GetEventTarget Log(Btn.Tag) Click to expand... thank 10000