Form inheritance

Delphi is an object-oriented language and it is no wonder that objects and inheritance are used throughout the runtime libraries. That includes both user interface frameworks, VCL and FireMonkey, where every user interface element from a label to a form is represented as an object.

It is no big surprise that we can use the object-oriented approach to create new user interface elements by deriving from existing ones. As each form is represented with its own class (usually inheriting from TForm), we can even use inheritance to create new forms. Even more, the IDE implements tooling support for creating inherited forms and maintaining the repository of base forms.

Chapter 5, Adapter, Proxy, Decorator, and Facade, discusses how ...

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.