Unit 'ShellCtrls' Package
[Overview][Types][Classes][Procedures and functions][Index] [#lcl]

TCustomShellTreeView.Root

Indicates the directory to start showing the list of items.

Declaration

Source position: shellctrls.pas line 109

public property TCustomShellTreeView.Root : string
  read FRoot
  write SetRoot;

Description

Root is a String property used to set the directory (or logical device) used to fill the list of items in the tree view control. Changing the value in Root causes the Items in the control to be re-populated.

No actions are performed in the method when a new value is set for the the Root property while the component is being loaded using the LCL streaming mechanism. The actions are performed when the Loaded method is called.

An empty string ('') indicates that the base path for the platform should be used to populate the tree view. This causes the PopulateWithBaseFiles method to be called to determine the Items displayed in the control.

Setting Root to an invalid path name causes an EInvalidPath exception to be raised at run-time. The error is ignored, and an exception is not raised, at design-time to prevent crashing the Lazarus IDE.

TShellTreeNode instances are created and added to the Items property using the expanded fully qualified path name in Root.

If ShellListView has been assigned for the control, its Root property is updated to match the new value for the property.

See also

TCustomShellTreeView.GetBasePath

  

Returns the initial path in the file system hierarchy for the platform.

TCustomShellTreeView.Items

  

The container with the TTreeNode instances used in the control.

TCustomShellTreeView.PopulateWithBaseFiles

  

Fills the tree view when the Root directory is empty.

TShellTreeView.ShellListView

  

Connects this ShellTreeView to a ShellListView.

TShellListView

  

Implements a list view control to display the files, directories and other objects (such as devices) on the local file system.

TShellTreeNode

  

Represents tree nodes in TShellTreeView.