Scrolling a Form in Delphi FMX for Android

492 Views Asked by At

The form has a ScrollBox. Several Layouts (Align: Top) are placed on the ScrollBox. 4 Labels are placed in Layout. The overall width of the Label is greater than the width of the Android screen. When the application starts, only the vertical scroll bar works. Horizontal doesn't work. Can you please tell me how to make the horizontal scroll bar work as well??

I tried changing align for Layouts (Align: Left). Then the horizontal scrollbar works. Vertical doesn't work.

1

There are 1 best solutions below

0
On BEST ANSWER

From the sounds of it, the Scroll Box has nothing wider in it than the Scroll Box itself, so there is nothing to scroll horizontally. By aligning the Layouts at the top, you are also telling them to make themselves the width of the Scroll Box. The Scroll Box would be checking the with of its contents, not the contents of any Labels that are in the Layouts.

What you need to do is change the Layouts' Align:Top to be Align:None and set their width to the width of the Label.