Allow Drag setting in ListBox no longer available?

WebListBox - there is a difference between 2020r1 and 2019r3.2 - the earlier version uses like two lines of code to create a row and insert a project picture into the row, whereas the other is a mystery for me rn.

LOL really they should have the functionality of both APIs - really API2 could have benefitted novice users more if it was an upgrade to 1, not a more complex rebuild.

I used to write technical documentation. The docs need a thorough sifting-through and an update.

2 Likes

Web 2.0 is an entirely new framework. This implementation gives you greater flexibility as you define the behavior. There are threads on the forums that already show how to implement this in Web 2.0’s WebListBox, like this one.

2 Likes

Not more simple than Web 1.0, much more code, a not strictly single type syntax. It is something to lern completely new.

1 Like

Thanks - now how would it work to drag and drop a pic between listboxes?

I am trying to develop a control where a user will drag pics from one list box to the second.

That functionality has not yet been implemented for Web 2.0 and would require creating a custom solution with JavaScript.

What would it be in 2019r3.2?

I do not believe this existed out of the box in Web 1.0, either. Barring creating a custom ListBox solution that allowed this sort of functionality, you could add buttons for transferring items from one to the other with captions such as “>>” and “<<“.

1 Like

The only reason I said “yet” is because I have a vague recollection of a thread where it was hinted this was something they wanted to add eventually.

A simple sentence to nform you that WEB1 (the one you use in Xojo 2019r3.2) is removed in 2020r1 (and following, of course).

So, you can either continue to use WEB1 (Xojo 2019r3.2) or WEB2 (Xojo 2020r1 and following). If you use the former, and if you - one day - upgrade to the later, you will have to rewrite your project.

Nota: this is only informative, I do not push you to do one or the other. This is up to you.

1 Like

Anthony, do you have any plans to add drag and drop events to your GraffitiWebGrid component in GraffitiSuite2 ? For data centric apps being able to re-order entries via drag 'n drop, or drag and drop rows or cells between GraffitiWebGrid components would be welcome.

I guess, for Amy the easiest fall back remains implementing her logic between two container controls (as discussed earlier post Drag and drop - pics within list boxes), or as you suggest placing buttons with ‘move’ actions between the source and destination WebListBox controls.

You can already drag reorder rows and columns in GraffitiGrid for Web2. I do want to enable drag between functionality for the Grid, but it won’t be until the Grid is running on the new WebSDK without my Web 1.0 shim. Right now I’m building some products directly on the new SDK to iron out my process, then I’ll be tackling that.

1 Like

Hello Anthony, I hope you are travelling well (in this crazy year).

Thank you for the update, I was unaware that reorder rows / columns was available within a single GraffitiWebGrid (nice). I read your blog post (that mentioned your web 1 shim) with great interest.

I wonder if Amy could achieve her goal in a single GraffitiWebGrid (leaving a dividing row, between her two record sets (thinking vertically rather than side by side).

It might be possible, but I don’t think it would be intuitive for the user and the code would be…interesting?

1 Like

And those << / >> buttons are my workaround.

1 Like

Happy to help!

I think that the buttons would be the quick’n’dirty way to make this happen… because drag and drop is not always compatible with mobile devices, and blind people would have a harder time with a drag and drop.

I actually GOT drag to work with web container controls… now I just need to figure out how to get the text and style to copy over to the container control that i drag on to.

If there is a way to EMBED the actual container control that I just dragged into the container control that I dragged /from/, then that would work, too!

*For the video I used VideoProc and for the conversion from MP4 to GIF I used an app from the Windows Store called Video to GIF Maker.

For the cRow container control, I had the Open event run the following code:

Me.AllowTextDrag(15)
Me.AcceptTextDrop(15)

I tried the following code on the DropObject event handler code:

Var sstringh As String
sstringh = Obj.Text
Label1.Text=sstringh

Totally not sure what I am doing wrong here
-____-