RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomListView.CanChange Method

Specifies whether the properties of a list item can be changed.

Pascal
function CanChange(Item: TListItem; Change: Integer): Boolean; dynamic;
C++
__fastcall Boolean CanChange(TListItem Item, int Change);

CanChange is called automatically when an attempt is made to change the item specified by the Item parameter. The Change parameter is a Windows-defined constant that specifies the type of change that was attempted. CanChange generates an OnChanging event to determine whether the change should be permitted. CanChange returns true if the change can proceed. CanChange returns false if the change should be blocked. CanChange always returns true if there is no OnChanging event handler. 

Override CanChange to add additional logic to determine whether a change should proceed or to block the OnChanging event. 

 

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