Block alignment need it

image

that modification is assumed to be available in blocks

1 Like

For some reason I still can’t understand, that block was never introduced, not even in the original App Inventor.
The only workaround I can think of is to have 3 different textboxes, each one with a different alignment but only one visible. When the user wants to change the alignment, copy the text of the visible textbox to the corresponding invisible textbox. Next make the old textbox invisible and the new one visible.

5 Likes

blocks
I think the most related thing is the dynamic component.
Only dynamic textbox or label can set alignment in blocks sections

2 Likes

This is what we want

2 Likes

Agreed, +1.

2 Likes

@Bart made a PR on the App Inventor sources where there would be more setters and getters in the blockeditor for options that are only available in the designer.

6 Likes

So set it to #feedback:iwant

1 Like

good idea :grin:

1 Like

And change the title too
The block is not missing
but you want it

1 Like

There’s another workaround. I didn’t think of dynamic components!

One way would be this :point_down: (though not perfect)

Here :point_down: are the blocks

blocks (55)

It uses a vertical arrangement with a label in it. I simply change the Horizontal alignment of the vertical arrangement’s content (i.e. Label)

One drawback of this method that I can see is , this method will not work if your label’s width is set to fill parent.

Though this is simply a workaround.

2 Likes

Wow genius!
I never thought of that!

1 Like

Or this:

1 Like

label

1 Like

What if it is two lines :smirk: :unamused:

1 Like

1 Like

Try this: labelAlignment2.aia (3.7 KB)

label1

:sweat_smile:
I don’t want you to be disappointed

But

Work with this extension

Therefore, html cannot be enabled

Please note that these workarounds work for labels, but they are not going to work if you want to change the alignment of a textbox in which you have to type and it has a fixed width.

For that to work, you will have to use the hidden textboxes I mentioned before or the dynamic components solutions.

3 Likes