How do you create a procedure that takes 2 vertical arrangements as parameters?

Hi,

I'm beginning programming apps with App Inventor. I have an app with several screens, but instead using screens I'm using Vertical Arrangements. With the help of a Timer I make the animation of the transition when an VA collapses and the next one appears. It works fine, but as I have a lot of animations among the VA, the amount of blocks inside the "When Clock1 Timer" is huge.

Is there a way of making a procedure that takes as parameters the 2 Vertical Arrangements to reduce the amount of blocks by calling this procedure?

I have attached a part of the code to illustrate what I mean.

Thank you in advance for your help.

You mean like this ?

image

Yes TImAI2 something like this.
I do not know how to access to the property width of VA1 and VA2.
If it is possible to do it. Would you please teach me how to do it?

Thank you for your help.

Use this block

image

Oh, and you can use the anyComponent blocks to get / set properties for a specific component:

image

To see how to use generic blocks, see

Thank you but I'm a bit lost. (not a bit, maybe a lot :slight_smile:)
Where can I find the green block "Vertical Arrangement (Width)".
I do not know where to pick it.

I'm sorry but I'm beginning programming with AI2 and there are things that are difficult to understand to me.

image

Finally I got it.
Thank you to all of you for your



help.

I attach the blocks for the procedure and for calling it-

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