Weird Spacing issues

So I was making a basic calculator app. I decided to use the table arrangement to correctly space the buttons. I used percentage to set the sizes of the different UI elements, but even though the total percentage is less than 100%, it exceeds the bottom and right sides of the screen. How do I fix this?

The values you get for Screen1.Height and .Width in Screen.Initialize migh not be accurate.
They need a moment to settle down as the Screen is loaded.
Use a one shot Clock Timer to get the values a little later for your component setups.

Also, I recommend nested Horizontal and Vertical Arrangements over Table arrangements for uniform button grids.

Sample button grids:

2 Likes

If table arrangements don't work for this purpose, what are they supposed to be used for???

It is just that table arrangements can be a bit buggy, not displaying buttons, not handling copy and paste. Better to stay away....

They might be useful for small arrangements of buttons like in a remote control, where you want ergonomic placement (up,down, left, right, Enter) but are nor concerned with row and column counting like in a chess board.

If you are doing an m by n rectangle of buttons or labels, the Designer copy/paste can let you create it in m + n operations in nested Arrangements (Copy your first button, m pastes in a Horizontal Arrangement to create the first row, then copy the Horizontal Arrangement and paste n times into a Vertical Arrangement to get n rows), vs m * n operations in a Table Arrangement.

Also, Table Arrangements make it easy for you to put components into the wrong cell.

Every few months, we get a post complaining about a corrupted project from a Designer copy/paste into Table Arrangements.

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