Sign in Join
FPDoc Onlineexperiment

TCustomListView.CanEdit function

Member of TCustomListViewprotectedIn unit ComCtrls

Determines if the specified list Item can be edited in the control.

Declaration

pascal
function CanEdit(Item: TListItem): Boolean; virtual

Arguments

Item

List item to examine in the method.

Function result

True if the editor can be displayed and activated for the specified list item.

Description

CanEdit is a Boolean function used to determine if the editor can be displayed and activated for the specified list Item. The default return value is True.

CanEdit signals the OnEditing event handler (when assigned) where the return value can be modified. The event handler can examine values in the Item argument, the list view instance, or use other user-specified criteria to determine the return value.

CanEdit is called from the ShowEditor method, and occurs before the Editor in the control is configured and displayed. Use the Readonly property to prevent ShowEditor from being called when keyboard (F2) and mouse click events are handled in the control.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.