Hello,
I want to make something like windows explorer. So the easy part first. I added these:
ShellTreeView1: TShellTreeView;
ShellListView1: TShellListView;
ShellComboBox1: TShellComboBox;
I connected them and everything is good. I can see files and I can navigate folders, drivers, e.t.c. I changed the ViewStyle attribute of ShellListView1 to vsReport. This is the "Details" Option in windows explorer. With the vsReport attribute you can see these records: "Name" - "Size" - "Type" - "Date Modified" of every file.
Example: http://img371.imageshack.us/img371/9803/ex1ox3.jpg
If the item in ListView is folder, it diplays 'File Folder' under the "Type" column. If it's a file, it diplays the file type. What I want to do is change the "File Folder" to "Super Folder" and change the file type to "Super File". So I changed the 'OnChange' event of the ShellTreeView1 and added the following code:
procedure TForm1.ShellTreeView1Change(Sender: TObject; Node: TTreeNode);
var i:word;
li : TListItem;
begin
if ShellListView1.Items.Count > 0 then
begin
for i:=0 to ShellListView1.Items.Count-1 do
Begin
li:=ShellListView1.Items.Item[i];
MessageDlg(li.SubItems[1],mtError,[mbOk],0);
end;
end;
end;
With this code I can "read" the Type Column for every file/folder in a folder. But when I add, after the MessageDlg, this code: li.SubItems.Insert(1,'Super Folder: ');
It doesn't change the "File Folder"/File Type to "Super Folder: " as it should. Any ideas how I could implement it?