Drag and drop dynamic created buttons and update the list

Hi all,

Is there a simple way (extension probably drag and drop) to move (dynamicly created) buttons from list and update the list (after drag and drop)?

The idea :

Thank you in advance for any help!

There are such extensions. But they are not easy to use. Search in the catalog:

I know there is a lot of extensions... But could you give me more precise answer? with sample of code how to do that.

I think you need to ask the author of the specific extension for a code sample.

You can drag sprites that look like buttons on a Canvas.

You can draw text onto a side canvas and use it's image file on a Sprite afterwards.

1 Like

An extension from our community, by PowerUser Juan Antonio.

something similar like this??

1 Like

Here is an example of the extension I gave above:
DragAndDropSentence.aia (14.8 KB)

1 Like

Yes!!! something like this, but I cant open it in app inventor :frowning:

Can words be arranged vertically? Because you gave an example of horizontal arrangement.

1 Like

You rock! Thank you for your help (practical example of this extension). Thank you, thank you very much, I really appreciate!!! :heart_eyes: :smiling_face_with_three_hearts: :heart:

I created my example with words arranged only horizontal so I think for me right now will be enough :slight_smile:

I was happy too soon... Places words incorrectly. Try move first button to last position :frowning:

That's the extension's fault. The drag and drop extension drops a button before another button. There is no other extension...

if drag and drop button have problems, you can use another way:

add other two button, one for move left, one for move right.
select the word button , then press the move button to move the selected word button (by exchange text with its neighbor)

bubble_sort_buttons.aia (5.4 KB)

This is a button based bubble sort approach.
I might have my left and right buttons switched, it is a rush job.


A workaround might be to add an extra button at the end. This button does nothing, enabled = false. Add it to the drop button list. When you want to set a word at the end, you will drag it to this additional button.

drag_and_sort.aia (16.5 KB)

use webview and sortable.js


Here is a more user friendly interface, based on a html label with bold and superscript highlighting to simulate an arcade claw machine.

bubble_sort_buttons_V2.aia (5.2 KB)

P.S. I got to use the new nb191 slice list block here.

1 Like

I did not suspect so many responces.
Thank you all for your help! I really appreciate for all your help. You are fantastic!

Kevinkun your solution looks awesome! I will try to adapt it into my project! Thank you, thank you!
:heart: :smiling_face_with_three_hearts: :heart_eyes: :handshake: :+1:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.