How do I change the screen alignment from Left to Right by clicking the button?

I want to use a buttons for changing my default left side screen alignment to right side allignment ! Please help me if anyone knows how it works !
I have attached a snapshot with it, please have a look !
snapshot1

see the documentation Screen - Kodular Docs

A number that encodes how contents of the screen are aligned horizontally. The choices are: 1 = left aligned, 2 = horizontally centered, 3 = right aligned.

Screen ▾.Align Horizontal ▾

setScreen ▾.Align Horizontal ▾ to

Taifun

2 Likes

Can you show me that in form of blocks (snapshot) !
Please !

It’s just a couple of basic blocks. If you don’t know how to use Kodular you should read the documentation and search the forums.

as far as I can see your blocks looks fine
Taifun

2 Likes

Actually, I tried but it was not working during test !
I tried all these ways (see attachments) to make it possible but none of them works for me thats why I need experts help !! I am also attaching project aia file also with it, please help me !
I shall be very thankful to you for this act of kindness !
TK.aia (1.9 KB)

1 2 3

@Tabish_Khan How do you want the app to function?? When clicking on the “menu4” button, do u want the alignment to change between left to right and vice-versa??

1 Like

Yes, I want that when I click on the button ( menu4) then the screen alignment changes from left to right !

@Tabish_Khan, you are trying to change alignment of the screen. You have to change the alignment of the Horizontal_Arrangement1, to view the difference.
Like this…!!
blocks
Here’s the .aia file attached
TK (1).aia (446 Bytes)

This is because you placed your menu button in the horizontal arrangement with width fill parent. So altering the alignment of the screen wouldn’t show any difference when viewed.

Sorry but my problem is related with changing of Screen Alignment from Left to Right by click on a button !
I used Horizontal alignment just for adding button (menu4) in the project aia only for understanding my issue bitterly. I also used vertical arrangement in it for the purpose of adding label if you have noticed in the attached aia file.
Both Vertical and Horizontal arrangement are used randomly !

1 Like

Its similar to the above mentioned. Replace of Horizontal_Arrangemnt1, with ScreenName. And make sure you have your components in the screen itself, and not within a horizontal or vertical arrangement in a screen. If so, then make the width of those arrangements to automatic, then you’ll be able to align the components.

I think this is what you are looking for. Please do try to see the .aia file attached. I’ve used a button to toggle the alignment of a screen, which has different labels in different arrangements. I think this might help you.

TK_.aia (446 Bytes)