你可以用listview来实现,windows就是这么做的
procedure ReadFileList(ListView:TListView;LargeImageList,SmallImageList:TImageList;FileIniName:string);
var
StrL:TStringList;
i:integer;
Item:TListItem;
GameName:string;
Path:string;
MainPro:string;
Icon:TIcon;
begin
try
ListView.Clear;
StrL:=TStringList.Create;
Icon:=TIcon.Create ;
ReadIniSection(FileIniName,'GameList',StrL);
for i:=0 to StrL.Count - 1 do
begin
Item:=ListView.Items.Add;
GameName:=StrL;
Path :=ReadINI2(FileIniName,'PathList',GameName);
MainPro:=ReadINI2(FileIniName,'MainProList',GameName);
Item.Caption := GameName;
Item.SubItems.Add(Path);
Item.SubItems.Add(MainPro);
if FileExists (MainPro) then
begin
Icon.Handle:=ExtractIcon(LargeImageList.Handle,pchar(MainPro),0);
Item.ImageIndex := LargeImageList.AddIcon(Icon);
Icon.Handle:=ExtractIcon(SmallImageList.Handle,pchar(MainPro),0);
Item.ImageIndex := SmallImageList.AddIcon(Icon);
end
else
begin
Item.ImageIndex:=0;
end;
end;
finally
freeandnil(strl);
freeandnil(Icon);
end;
end;