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
你希望*代碼做什麼?我認爲你對代碼的含義缺乏瞭解,這當然會引出你爲什麼複製它的問題。 –