[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'ComCtrls' (#lcl)

TLVChangingEvent

Defines an event handler signalled when a widgetset class is updating an item on a list view control.

Declaration

Source position: comctrls.pp line 1294

type TLVChangingEvent = procedure(

  Sender: TObject;

  Item: TListItem;

  Change: TItemChange;

  var AllowChange: Boolean

) of object;

Arguments

Sender

  

Object (TCustomListView control) for the event notification.

Item

  

List item with the pending change,

Change

  

Identifies the list item value changed in the notification.

AllowChange

  

Indicates whether the change is accepted or rejected in the event handler. True for an accepted change.

Description

TLVChangingEvent is an object procedure used to define the event handler signalled when a list item on a TListView is being updated by the widgetset class instance. It is the type used to implement the OnChanging property in TCustomListView, and allows the pending change to be accepted or rejected on an item-by-item basis.

The Sender argument contains the object for the event notification, It must be cast to TCustomListView to access properties and methods specific to the list view control.

Item contains the TListItem instance on the list view control which is being updated, and the values for the modified list item.

Change indicates which value in Item is being modified: the caption text, the image for the item, or the item drawing state. See TItemChange for the values used in the argument, and their meanings.

AllowChange is a variable Boolean argument which allows the handler to indicate whether the change is accepted or rejected. Set AllowChange to False to reject the modified value in Item.

See TCustomListView.OnChanging for more information about the event notification for the list view control.

Version info

Added in LCL version 4.0.

See also

TItemChange

  

TItemChange - enumerated type for kind of change: in text, in image, or in state.

TListItem

  

Represents the items created in TCustomListView and descendants.

TCustomListView.OnChanging

  

Event handler signalled when a change notification is received for a list item.

TCustomListView.Items

  

Collection of list items displayed on the list view control.


Version 4.0 Generated 2025-05-03 Home