How do you set width of horizontal and vertical layouts to fill parent via blocks?

Greetings.

Quick question: How do I set a horizontal arrangement's layout to fill parent via blocks?

You can use these special values for width and height:

  • -1 = Automatic
  • -2 = Fill Parent
1 Like

Oh thank you so very much!

Can you please tell me where this is documented? I could not find it via google search. Maybe there is something else in that documentation that will help me out.

I'm not sure that it is documented anywhere other than in the code base. I think the general assumption regarding the design was that sizing such as automatic or fill parent would be sufficient at all times if opted in at design time. I'm curious what your use case is that requires switching to/from these states.

I am not switching. I just a lot of layouts and I don't want to set the fill parent property for each of them. And in my case I am doing a class routine for teachers with 10 vertical arrangements each containing two labels. The ten vertical arrangements are for a single day. And there are 7 days. So in total there are 70 vertical arrangements.

You might be thinking that doing this in runtime will a waste of resource, but I just started making it, and i want to do this to size up the arrangements. Before the final build, I will set up all the arrangements from the designer mode.

Thank you very much.

This is a nice chance to use the new Designer copy/paste feature (Ctrl-C/Ctrl-V).
Set up the first item to your taste, copy it, then keep pasting in copies.

1 Like

Holy s**t!!! I did not know app inventor had that copy paste feature in designer mode. BTW when did this implemented?

1 Like

30 July

2 Likes

Thank you very much!!!!! I was finding this!

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