TableArrangement & FillParent


I have a TableArrangement with two columns. The Width of the TableArrangement ist FillParent. This works as expected. The arrangement fills the whole screen.

The first column contains Labels with property Width=Automatic. The arrangement calculates the width of this column from the largest Label.

The second column contains TextBoxes with property Width=FillParent. I would expect that the fill the rest of the arrangement which has the size of the screen. But they don't. The default size of the TextBoxes are used. This true for other component types.

Kind regards

1 Like

Table Arrangements do have such a known problem.
Try something like this

Say your label takes 50 pixel width on the screen, then set the textbox's length to screen width - 50 pixels



1 Like

Try to set the widht in %:
tableWidht.aia (2.9 KB)



... or this:


The solution with a timer works fine. The size of the components has not yet been set on the Screen.Initialize event. They are zero.

You don't need to calculate the percentages, you can just substract TableArrangement.Width - Label.Width.

The timing is a bit critical. Depending on the app this may be to short. If it is to long you have visible effects. So, first I check whether the layout of the reference label has already been calculated. Then you can work with even shorter intervals.

1 Like

Personally, I would stay away from the "Table Arrangement" and use a combination of vertical and horizontal arrangements instead. The Table Arrangement operates some peculiar (to developers) behaviours - an android thing.