How to add an image to every node of TShellTreeView lazarus / 31-LCL ---------------------------------------------------------------------- Gizmo · 2015-09-17 22:18 Hi I am using TShellTreeView to show a folder list and wish to add a custom icon of a folder fo each folder in the tree. I have created an ImageList and assigned it to the ShellTreeView. It has one image it, index 0. I have used the following which works for the initial level of folders, but none of the child folders (sub-folders) have the icon? How can I adjust the following so that every entry in the tree has the icon (seeing as every item listed is only a folder and not a file): Code: [Select]// DirListA is of type ShellTreeView  z := 0;   for z := 0 to DirListA.Items.Count -1 do   begin     DirListA.Items[z].ImageIndex := 0; // Add the folder icon for each node   end; ---------------------------------------------------------------------- derek.john.evans · 2015-09-17 22:32 Use the events OnGetImageIndex and OnGetSelectedIndex: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.ShellTreeView1GetImageIndex(Sender: TObject; Node: TTreeNode);begin  Node.ImageIndex := 0;end; procedure TForm1.ShellTreeView1GetSelectedIndex(Sender: TObject; Node: TTreeNode);begin  Node.SelectedIndex := 0;end;