TWinControl/TWidgetControl branch in Delphi
Most controls fall into the TWinControl/ TWidgetControl branch. Unlike graphic controls, controls in this branch have their own associated window or widget. Because of this, they are sometimes called windowed controls or widget controls.
Windowed controls all descend from TWinControl, which descends from the windows-only version of TControl. Widget controls all descend from TWidgetControl, which descends from the CLX version of TControl. Controls in the TWinControl/TWidgetControl branch:
- Can receive focus while an application is running, which means they can receive keyboard input from the application user. In comparison, graphic controls can only display data and respond to the mouse.
- Can be the parent of one or more child controls.
- Have a handle, or unique identifier, that allows them to access the underlying window or widget.
The TWinControl/TWidgetControl branch includes both controls that are drawn automatically (such as TEdit, TListBox, TComboBox, TPageControl, and so on) and custom controls that do not correspond directly to a single underlying Windows control or widget.
Controls in this latter category, which includes classes like TStringGrid and TDBNavigator, must handle the details of painting themselves. Because of this, they descend from TCustomControl, which introduces a Canvas property on which they can paint themselves.