RAD Studio |  |

TControl Branch
See Also
Collapse All

The TControl branch consists of components that descend from TControl but not TWinControl applications). Classes in this branch are controls: visual objects that the user can see and manipulate at runtime. All controls have properties, methods, and events in common that relate to how the control looks, such as its position, the cursor associated with the control's window, methods to paint or move the control, and events to respond to mouse actions. Controls in this branch, however, can never receive keyboard input.

Whereas TComponent defines behavior for all components, TControl defines behavior for all visual controls. This includes drawing routines, standard events, and containership.

TControl introduces many visual properties that all controls inherit. These include the Caption, Color, Font, and HelpContext or HelpKeyword. While these properties inherited from TControl, they are only published—and hence appear in the Object Inspector—for controls to which they are applicable. For example, TImage does not publish the Color property, since its color is determined by the graphic it displays. TControl also introduces the Parent property, which specifies another control that visually contains the control.

Classes in the TControl branch often called graphic controls, because they all descend from TGraphicControl, which is an immediate descendant of TControl. Although these controls appear to the user at runtime, graphic controls do not have their own underlying window or widget. Instead, they use their parent's window or widget. It is because of this limitation that graphic controls cant receive keyboard input or act as a parent to other controls. However, because they do not have their own window or widget, graphic controls use fewer system resources. For details on many of the classes in the TControl branch, see graphics controls.

TControl is designed for VCL (Windows-only) applications. Many controls descend from TControl. The Windows-only controls use native Windows APIs in their implementations.

See Also

TPersistent Branch

Objects

TComponent Branch

TObject Branch

TWinControl/TWidgetControl Branch

TControl

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!