Auf denen Code bezogen dann so
Delphi-Quellcode:
procedure TfrmWizard.RefreshFileList;
var iPath,
iFile : Integer;
Item1,
Item2 : TTreeNode;
begin
treeFiles.Items.BeginUpdate;
try
treeFiles.Items.Clear;
for iPath := 0 to damData.Config.Paths.Count - 1 do
begin
Item1 := treeFiles.Items.AddChild(nil, '');
Item1.Text := damData.Config.Paths[iPath].Path;
Item1.ImageIndex := damData.GetFileIcon(damData.Config.Paths[iPath].Path);
for iFile := 0 to damData.Config.Paths[iPath].Files.Count - 1 do
begin
Item2 := treeFiles.Items.AddChild(Item1, '');
Item2.Text := damData.Config.Paths[iPath].Files[iFile].FileName;
Item2.ImageIndex := damData.GetFileIcon(damData.Config.Paths[iPath].Path + damData.Config.Paths[iPath].Files[iFile].FileName);
end;
end;
finally
treeFiles.Items.EndUpdate;
end;
end;