0
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
我复制粘贴在我的RAD Embarcadeo delphi表单代码上面的代码。但是,为什么我不能自动在窗体上到合适的位置代码标签上面的代码粘贴后得到 组件... 相反,它是给像如何在Delphi中使用源代码在窗体上自动获取对象?
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
你希望*代码做什么?我认为你对代码的含义缺乏了解,这当然会引出你为什么复制它的问题。 –