Show AdvTreeView node expanded with bitmap

With the AdvTreeView would like to change the icon to indicate folder is open or closed. Attached please find an image with the top two nodes expanded. Note there are two images per node the +/- to indicate folder open/close and the folder image to the right which is always closed.

SelectFTP

Thanks in Advance,

John

Hi,

Add a TPictureContainer and your icons.
Add the unit AdvTypes to the uses list and the following code to dynamically switch the node icon based on the expanded state:

procedure TForm1.AdvTreeView1GetNodeIcon(Sender: TObject;
  ANode: TAdvTreeViewVirtualNode; AColumn: Integer; ALarge: Boolean;
  var AIcon: TAdvBitmap);
begin
  if ANode.Expanded then
    AIcon := TAdvBitmap(PictureContainer1.FindBitmap('1'))
  else
    AIcon := TAdvBitmap(PictureContainer1.FindBitmap('2'));
end;