With the Dynamic Components library I am developing a procedure that creates a list of HorizontalArrangements that contain the username, the edit button and the delete button as shown in the figure.
buModificaUtenza→edit button
buEliminaUtenza→Del button
How can I implement the Click event for the two buttons if the Click block doesn't exist in the DynamicComponent blocks?
Use the AnyButton Click event.
You may have to temporarily drag out a real button to get it.
Where can I find AnyButton Click event? Show me how to do it, please. Maybe I must use ClickTools extension?
I have created an example for you:
Here you find the AnyButton component:
Some blocks
an aia
dyncompButtons.aia (34.1 KB)
Thank you but the buttons you create are few. I dynamically create N buttons: buEdit1, buDel1, buEdit2, buDel2, etc., where buEdit1 is the ID of the first edit button, buDel1 is the ID of the first delete button, and so on. I'm not able to select which button was clicked at that moment with App Inventor. I'll sound stupid, but I'm having trouble. Any suggestions?
Use if then logic in the when any button clicked event just like tim did
here is my approach:
I am using another dynamic component extension.
when button1 clicked, a horizontal arrangement is created, inside which:

the textbox is set to invisible.
compCreator_edit_del_20260505_201629.aia (65.0 KB)
In the end, I solved it differently: I basically read tinydb, where I save all the profile names and put them in a list. I get the row number from the component and take it from the list. Thanks everyone for your help.