We help IT Professionals succeed at work.

Find filename selected in TshellListView

seabear
seabear asked
on
Delphi 6 has some new shell components in the samples components tab. I am trying to use the TshellListView component and I simply want to find the name of the file or folder I have selected. However if I try test code like
    caption := ShellListView1.ItemFocused.Caption;
the itemfocussed.caption is blank. Could someone please tell me what I should do?

Thanks in advance - Dan
Comment
Watch Question

Commented:
well i do it like this

var
   sel:TShellFolder;
begin
  sel:=ShellListView1.SelectedFolder;
  Caption:=sel.PathName;
end;


works for files and folders!

Author

Commented:
Thanks - works nicely - Dan

Explore More ContentExplore courses, solutions, and other research materials related to this topic.