ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
ShellControls.TJamShellTree.OnAddFolder

Occurs if a new folder is added.

Syntax
Pascal
property OnAddFolder: TOnAddNode;

This event occurs, whenever a node is added to the TJamShellTree. You can use it to customize the appearance of the Node or to exclude it by setting CanAdd to false.

The following sample event handler hides the floppy drive in a TJamShellTree.

procedure TMainForm.ShellTreeAddFolder(Node: TJamShellTreeNode; Path: String;
var CanAdd: Boolean);
begin
CanAdd := not (GetDriveType(PChar(Path)) in [DRIVE_REMOVABLE]);
end;

Excluding QuickAccess:

procedure TMainForm.ShellTreeAddFolder(Node: TJamShellTreeNode; Path: String;
var CanAdd: Boolean);
begin
CanAdd := Node.SpecialFolder <> SF_QUICKACCESS;
end;