Event-driven programming

Creating applications by writing event handlers is a basic tenet of rapid application development with Delphi. From responding to button clicks to reacting to an application being resized, from overriding paint mechanisms to writing code that executes when the application is idle everything is done by writing event handlers.

Event-driven programming is not a Delphi invention. It was introduced a long time ago with the appearance of the first Graphical User Interface (GUI) libraries. Before this programming paradigm was introduced, programs were written as big ugly loops that checked the position of the mouse against each GUI element, checked whether a button had been pressed, called some code if it was, checked the ...

Get Hands-On Design Patterns with Delphi now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.