TCustomShellTreeView.OnAddItem property
Event handler signalled when an item (tree node) is added to the shell control.
Declaration
property OnAddItem: TAddItemEvent read FOnAddItem write FOnAddItem;Description
OnAddItem is a
TAddItemEvent property which contains
the event handler signalled when an item (tree node) is added to the shell
control. OnAddItem is signalled from the
PopulateTreeNodeWithFiles
method, and allows the base path and file information for each file to be
checked before it is added to the Items for the tree view control.
An application must implement and assign an object procedure using the signature in TAddItemEvent to the handler. The Sender argument is the tree view control for the event notification. ABasePath contains the value from BasePath in the tree view control. AFileInfo is a TSearchRec instance with the attributes for the file system object represented in the node. CanAdd is a variable parameter which indicates whether the file system object should be added to the Items property. Set CanAdd to False in the event handler to omit the file system object in Items.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
