RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomListView.CanEdit Method

Specifies whether the text of a list item can be changed by the user.

Pascal
function CanEdit(Item: TListItem): Boolean; dynamic;
C++
__fastcall Boolean CanEdit(TListItem Item);

CanEdit is called automatically when the user attempts to edit the text of the list item specified by the Item parameter. CanEdit generates an OnEditing event to determine whether to allow the user to edit the item. CanEdit returns true if the user can proceed. CanEdit returns false if the user should be blocked from editing the item. CanEdit always returns true if there is no OnEditing event handler. 

Override CanEdit to add additional logic to determine whether an item can be edited or to block the OnEditing event. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!