Drag and drop - pics within list boxes

Not sure how to drag and drop pictures between two list boxes. This is for web v 2019r3.

Also, could this be done with container controls?

Hello Amy,

I believe drag and drop is not implemented for WebListBox in 2019. My memory is foggy on it, but I do recall it working at some point prior to the 2019 releases.

That said, you can implement it using container controls. Please review this post from last year by John Scanlon, web container drag and drop with all properties, the example file is still accessible (just note Greg’s fix to a couple of lines of code noted in the post).

I had hoped Row to Row or Cell to Cell drag and drop would be a feature of the new WebListBox. Most of my web apps are data centric and this would be handy without complex workarounds.

I hope that helps. Kind regards, Andrew

1 Like

Container control solution worked.

I sorted out a workaround for THAT workaround, too - no JavaScript or anything horribly complex required…

On the sending controls, I used a set of embedded Row containers to send their pertinent data over to properties within the webpage via the MouseDown event handler on a Row container and customized the group of embedded Row containers when the sending controls are shown.

On the receiving control, I used the Drop event handler to call a Method on the original receiving container to embed a Row container, customize that embedded container with the properties and data from the webpage that were sent from the dragged (MouseDown) Row, and then disabled the sending container’s Row control by using the parent and controlname data.

I uploaded the project to a blog post so that others can download and use my sample code.

Hope this helps!

1 Like

Very cool @Amy_Barnes, I will take a closer look. Thank you for sharing.

1 Like

Hello @Amy_Barnes,

The drag works for me on Mac | Safari. (Woohoo!)
The drag doesn’t work for me on Mac | Chrome.
The drag doesn’t work for me on Windows | Chrome.
The drag doesn’t work for me on Windows | Edge.

Not 100% sure why the ‘drag’ action fails, but taking a look now.

BTW, loved your bio on your article (lots of interesting sign posts on your journey).

1 Like

The drag works for me on Windows | Firefox. (Woohoo! [Best Experience])

1 Like

The drag doesn’t work for me on iPadOs | Safari.

My apologies, I would have placed this all in one post, but after a certain interval I was unable to edit my earlier post.

1 Like

FireFox tends to work for a lot of things that Chrome does not work for.

Thanks - I’ve had several careers over the past few decades.

As far as internet browsers go - it can be hit and miss when testing apps out.

I appreciate the in-depth testing across multiple browsers!

1 Like

Hello Amy,

Not sure if you tested it, but I wonder if John Scalon’s example project (posted earlier) also bombs on the same browsers?

Perhaps, raise a feedback case on the basis that the code should execute in the browsers tested.

1 Like

I probably should be making a feedback case… just gotta wrap up this project that is overdue. :grimacing: