VertScrollBox Detect when bottom reached android and IOS
VertScrollBox Detect when bottom reached android and IOS I have GridLayout1 on a VertScrollBox1 . The vertical scroll box scrolls through the content of the grid layout. I need to detect when the Vertical scroll box reach the bottom so I get to load more content to the grid layout. And do it again whenever bottom is reached again. GridLayout1 VertScrollBox1 How can I achieve this? 1 Answer 1 Use the OnViewportPositionChange() of the VertScrollBox1 . Then some simple arithmetics tell you when you are at the bottom: OnViewportPositionChange() VertScrollBox1 uses Math, ...; // ... procedure TForm1.VertScrollBox1ViewportPositionChange(Sender: TObject; const OldViewportPosition, NewViewportPosition: TPointF; const ContentSizeChanged: Boolean); begin if CompareValue(NewViewportPosition.Y, GridLayout1.Height - VertScrollBox1.Height) = EqualsValue then Memo1.Lines.Add('At bottom, time to gro...