You can get the scroll bar information through the API and determine if it is at the bottom.
function IsScrollBarAtBottom(Box: TScrollBox): Boolean;
var
Info: TScrollInfo;
begin
Info.cbSize := SizeOf(Info);
Info.fMask := SIF_POS or SIF_RANGE or SIF_PAGE;
Win32Check(GetScrollInfo(Box.Handle, SB_VERT, Info));
Result := Info.nPos >= Info.nMax - Info.nMin - Info.nPage;
end;
source
share