Count Property Example

The following program code displays the number of items in a Mult component in the caption of a label when the user clicks the CountItems button:

procedure TForm1.CountItemsClick(Sender: TObject);
begin
  Label1.Caption := 'There are ' + IntToStr(Mult.Count) +
    ' items in the Mult.';
end;