TddgButtonEdit—Container Components

Occasionally you might like to create a component that is composed of one or more other components. Delphi's TDBNavigator is a good example of such a component because it consists of a TPanel and a number of TSpeedButton components. Specifically, this section illustrates this concept by creating a component that is a combination of a TEdit and a TSpeedButton component. We will call this component TddgButtonEdit.

Design Decisions

Considering that Object Pascal is based on a single-inheritance object model, TddgButtonEdit will need to be a component in its own right, which must contain both a TEditl and a TSpeedButton. Furthermore, because it's necessary that this component contain windowed controls, it will ...

Get Borland® Delphi™ 6 Developer's Guide now with O’Reilly online learning.

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