procedure TMyForm.FormCreate(Sender: TObject);
var
Group: TListGroup;
Item: TListItem;
s1, s2: string;
begin
ListView1.ViewStyle := vsReport;
ListView1.GroupView := True;
ListView1.Columns.Add.Caption := 'My column';
Group := ListView1.Groups.Add;
Group.Header := 'My header';
Group.GroupID := 0;
Item := ListView1.Items.Add;
Item.GroupID := 0;
Item.Caption := 'My item';
end
I copy pasted above code on my RAD Embarcadeo delphi form code. But why I am not getting components automatically on the form after pasting above code at suitable place on CODE tab... Instead it is giving many errors like
Undeclared identifier TListGroup at line 27
Undeclared identifier TListItem at line 28
Undeclared identifier ListView1 at line 31
Undeclared identifier ViewStyle at line 31
Undeclared identifier vsReport at line 31
Undeclared identifier GroupView at line 32
Undeclared identifier TListGroup at line 27