TShellTreeView.ReadOnly property
Indicates whether the text (or caption) for tree nodes can be edited in the shell control.
Declaration
property ReadOnly: 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.
See also
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
