Sign in Join
FPDoc Onlineexperiment

TMaskEdit.OnChange property

Member of TMaskEditpublishedIn unit MaskEdit

Event handler signalled when the text for the control is changed.

Declaration

pascal
property OnChange:;

Description

OnChange is a TNotifyEvent property with the event handler signalled when the text for the control is changed.

OnChange is triggered when the value in Text is modified either by using the keyboard or assigning a new value in program code. Please note that this differs from controls, like TCustomComboBox / TComboBox, where the event is not signalled when the control value is changed in program code.

When the control value is edited using the keyboard, OnChange is signalled after each character or keystroke is handled and applied to the value in Text. To avoid visible delays during editing, the event handler should not be too time or resource intensive.

Use the Modified property to determine whether the change is the result of user interaction with the control, or setting the control value in program code. Modified contains False if the value was assigned in program code.

OnChange is signalled (when assigned) from the Change method, and occurs after the Changed method is used to post the CM_CHANGED control message.

Use the OnEditingDone event handler to perform actions needed when editing has been completed in the control. For example: when the Enter key is pressed or the focus is changed to another control.

This description is the one of StdCtrls.TCustomEdit.OnChange.

See also

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