RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomListView.OnEdited Event

Occurs immediately after the user edits an item's Caption property.

Pascal
property OnEdited: TLVEditedEvent;
C++
__property TLVEditedEvent OnEdited;

Write an OnEdited event to take specific action when a user has finished editing the text of a list item. An OnEdited event handler can respond to the value the user typed, or change the value that is assigned to the list item's Caption property. For example, if an OnEdited event handler can check the validity of the string typed by the user, and only allow the Caption property to be changed if the new value is valid. 

The Item parameter is the list item that was just edited. The S parameter is the new value the user typed for the item's Caption property. Change the value of S to override the value the user typed. When OnEdited occurs, the item's Caption property has not yet been changed, so S can still be compared to the original value of Caption. 

This event can occur only if ReadOnly is set to false. 

 

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