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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.