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

# TShellTreeView.ReadOnly

Indicates whether the text (or caption) for tree nodes can be edited in the shell control.

## Declaration

Source position: shellctrls.pas line 179

`published property TShellTreeView.ReadOnly : Boolean default True;`

## Description

ReadOnly is a Boolean property which indicates whether the text for the TTreeNode instances in Items can be edited in the control. When ReadOnly is set to False, the BeginEditing method is not called when the F2 key is pressed, or when the Left mouse button is double clicked. The default value for the property is True.

The property value is True when tvoReadOnly has been included in the Options for the control. Setting a new value for the property causes tvoReadOnly to be included in or excluded from the values in Options. Changing the value to False causes the EndEditing method to be called.

The ReadOnly property was changed to True because the shell tree view does not automatically propagate changes to a tree node caption to the file system. The previous behavior was confusing because the user was able to rename a node but had to notice that the change was not persistent without additional code.

Applications using the shell controls only for selecting files and folders are not affected. In "file-manager" application types, however, the ReadOnly property must be changed explicitely to False so that the user can edit items/nodes again.

## Version info

Modified in LCL version 4.0 to set the default value for the property to True.

## See also

#lcl.comctrls.TCustomTreeView.ReadOnly |  | Indicates whether the text (or caption) for tree nodes can be edited in the control.
#lcl.comctrls.TCustomTreeView.Options |  | The set of options enabled in the tree view control.
#lcl.comctrls.TTreeViewOption |  | TTreeViewOption - enumerated type containing the permissible values for Options in TreeViews.
#lcl.comctrls.TTreeViewOptions |  | Set type used to store values from the TTreeViewOption enumeration.