procedure TForm2.ListView1ScrollViewChange(Sender: TObject);
var
R: TRectF;
LItem: TListViewItem;
I: Integer;
begin
if TListView(Sender).ItemCount > 0 then // Just in case...
begin
// Get the last item's Rect
R := TListView(Sender).GetItemRect(TListView(Sender).ItemCount - 1);
// Bottom?
if R.Bottom = TListView(Sender).Height then
begin
Caption := 'Reached bottom!';
for I := 21 to 40 do
begin
LItem := ListView1.Items.Add;
LItem.Text := IntToStr(I);
end;
end
else
Caption := 'Bottom not reached yet.';
end;
end;
Nenhum comentário:
Postar um comentário