Sign in Join
FPDoc Onlineexperiment

TShellListView.ReadOnly property

Member of TShellListViewpublishedIn unit ShellCtrls

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

Declaration

pascal
property ReadOnly:  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.

See also

  • ReadOnly
  • TListViewProperties
  • TListViewProperty

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.