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

# TShellListView.ReadOnly

Disables editing of list items on the shell control when set to True.

## Declaration

Source position: shellctrls.pas line 350

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

## Description

ReadOnly is a Boolean property used to enable or disable editing of captions for list items at run-time. When ReadOnly is set to True, the editor for the control cannot be activated using a mouse double Click or by pressing the F2 function key.

The default value for the property is True, and indicates that item editing is not allowed.

ReadOnly is one of the TListViewProperty values included in the TListViewProperties set type and exchanged with the widgetset class. The property value is read from and written to the TCustomTreeview widgetset class instance when its handle is valid. Changing the value for the property causes the widgetset class to be updated with the new value.

The ReadOnly property was changed to True because the shell list view does not automatically propagate changes in a list item to the file system. The previous behavior was confusing because the user was able to modify a list item 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.TCustomListView.ReadOnly |  | Disables editing of list items on the control when set to True.
TListViewProperties
TListViewProperty