[Overview][Classes][Index] Reference for unit 'CustomTimer' (#lcl)

TCustomTimer.OnTimer

Event handler signalled when the Interval for the timer has elapsed.

Declaration

Source position: customtimer.pas line 53

public property TCustomTimer.OnTimer : TNotifyEvent
  read FOnTimer
  write SetOnTimer;

Description

OnTimer is a TNotifyEvent property that implements the event handler signalled when the Interval for the timer has elapsed. The default value for the property is Nil as assigned in the constructor for the class instance.

Assign a TNotifyEvent procedure to the event handler to perform actions needed for the event notification. Setting the value in OnTimer causes the UpdateTimer method to be called to reflect the current values for the timer class instance.

Remark: Please note that OnTimer is not signalled during timer execution when Interval contains the value 0 (zero).

Use the OnStartTimer event handler to perform actions required when the timer is started by setting Enabled to True.

Use the OnStopTimer event handler to perform actions needed when the timer is halted by setting Enabled to False, or when calling the destructor for an executing timer class instance.

See also

TCustomTimer.Interval

  

The Interval (in milliseconds) for timer notifications.

TCustomTimer.Enabled

  

Indicates if the timer is ready to start.

TCustomTimer.OnStartTimer

  

Event handler signalled when the timer is started.

TCustomTimer.OnStopTimer

  

OnStopTimer - event handler for stopping the timer.

TCustomTimer.UpdateTimer

  

Updates the Timer to reflect the current properties.


Version 4.0 Generated 2025-05-03 Home