[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'ShellCtrls' (#lcl)

TCustomShellTreeView.UpdateView

Reloads the nodes for tree view control and synchronizes an associated ShellListView control.

Declaration

Source position: shellctrls.pas line 134

public procedure TCustomShellTreeView.UpdateView(

  AStartDir: string = ''

);

Arguments

AStartDir

  

Path to the first tree node updated in the method. Root is used when omitted.

Description

UpdateView is a method used to repopulate the nodes on a tree view control. It ensures that Items contains the entries needed for the current state of the local file system in the tree view control.

UpdateView ensures that the Selected and expanded tree node(s) are captured, and restored when the nodes in Items have been reloaded. If one of the selected or expanded nodes no longer exists on the file system, the Path in an existing parent node is used for the update. When a node is updated, its HasChildren property is changed to reflect whether subdirectories have been added or removed for the node.

The Selected property provides the selected tree node on the control.

Updates to the Items in the control are enclosed by BeginUpdate and EndUpdate method calls to reduce the number of updates while the control is reloaded.

UpdateView causes an associated ShellListView control to call its UpdateView method to synchronize the two controls. This action is omitted if ShellListView has not been assigned, or the directory requested does not affect the Selected tree node.

Version info

Added in LCL version 4.0.

See also

TCustomShellTreeView.Items

  

Contains the tree nodes used to represent the hierarchical tree structure for the tree view control.

TCustomShellTreeView.Refresh

  

Updates the tree view to display file system objects starting at the specified tree node.

TCustomShellTreeView.GetPathFromNode

  

Returns the path (including the file name) for the file system object represented in the specified node.

TCustomShellTreeView.NodeHasChildren

  

Determines whether the specified tree view Node has child nodes.

TCustomShellTreeView.ShellListView

  

Connects this ShellTreeView to a ShellListView.

TCustomShellListView.UpdateView

  

Reloads the contents for the list view control and restores the Selected item.

TCustomShellTreeView.Root

  

Indicates the directory or path which is the top-level node in the tree view.

TCustomShellTreeView.Path

  

Path to the directory displayed in the shell control.

TCustomShellTreeView.ExistsAndIsValid

  

Checks whether the specified path is a valid file system object and type for the tree view control.

TCustomTreeView.TopItem

  

TopItem - the first visible node of the tree.

TCustomTreeView.Selected

  

The selected tree node in the control.

TTreeNodes.BeginUpdate

  

Starts an update process for the tree nodes in the container.

TTreeNodes.EndUpdate

  

Finishes an update process for the tree nodes in the container.


Version 4.0 Generated 2025-05-03 Home