Types of Events
Go Up to Properties, Methods, and Events
Events that can occur can be divided into the following main types:
- User events
- System events
- Internal events
User events are actions that the user initiates.
Examples of user events are:
- OnClick (the user clicked the mouse; for example Vcl.Controls.TControl.OnClick)
- OnKeyPress (the user pressed a key on the keyboard; for example, Vcl.Controls.TWinControl.OnKeyPress)
- OnDblClick (the user double-clicked a mouse button; for example, Vcl.Controls.TControl.OnDblClick)
System events are events that the operating system fires for you.
Usually, system events are not directly initiated by a user action.
Internal events are events that are generated by the objects in your application.
An example of an internal event is the OnPost event that a dataset generates when your application tells it to post the current record.