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

# TCustomIdleTimer.DoOnIdle

Performs actions which execute the idle timer.

## Declaration

Source position: extctrls.pp line 235

`protected procedure TCustomIdleTimer.DoOnIdle(`
`Sender: TObject;`
`var Done: Boolean`
`); virtual;`

## Arguments

`Sender` |  | Object for the event notification.
`Done` |  | True if the idle timer has already executed its OnTimer event handler.

## Description

DoOnIdle is a procedure which performs the actions needed to execute the idle timer. The value in FireOnIdle is used to determine whether the timer can be executed for the idle state. When FireOnIdle is True, the DoOnTimer method is called to signal the OnTimer event handler (when assigned) and the value in the Done argument is set to False.

The AutoEnabled property is checked to determine if the value in the Enabled property can be updated to reflect the state needed for the AutoEndEvent and AutoStartEvent properties. If AutoEndEvent contains itaOnIdle, the value in Enabled is set to False. If AutoStartEvent contains itaOnIdle, the value in Enabled is set to True.

Remark: | The Enabled property is not modified when AutoEnabled contains False.

DoOnIdle is assigned as a handler for the Application singleton in the UpdateHandlers method.