Sign in Join
FPDoc Onlineexperiment

TCustomShellTreeView.DoSelectionChanged procedure

Member of TCustomShellTreeViewprotectedIn unit ShellCtrls

Performs actions needed when a new item is selected in the shell control.

Declaration

pascal
procedure DoSelectionChanged; override

Description

DoSelectionChanged is an overridden method used to perform actions needed when a new item is selected in the shell control. DoSelectionChanged calls the inherited DoSelectionChanged method, and ensures that a TCustomShellListView control assigned to ShellListView is synchronized to the current selection in the class.

No actions are performed in the method if values for either ShellListView or Selected have not been assigned (contain Nil).

Selected contains the current tree node selected in the shell control, and is used to determine if the selection is a file, directory, or other device. When it is a directory, its path is assigned to the Root property in ShellListView.

If Selected does not represent a directory, the path refers to a file name that must exist on the local file system. An EShellCtrl exception is raised if the selected item does not exist. If Selected has a parent tree node, its path is assigned to the Root property in ShellListView. If no parent is available, the Root property in ShellListView is set to an empty string ('').

Errors

Raises an EShellCtrl exception if Selected refers to a file name that no longer exists on the local file system.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.