Show: Delphi C++
Display Preferences

Creating Original Controls

From RAD Studio
Jump to: navigation, search

Go Up to Creating Components


Windowed controls in the component library are objects that appear at run time and that the user can interact with. Each windowed control has a window handle, accessed through its Handle property, that lets the operating system identify and operate on the control. If using VCL controls, the handle allows the control to receive input focus and can be passed to Windows API functions. Each widget-based control has a handle, accessed through its Handle property, that identifies the underlying widget.

All windowed controls descend from the TWinControl class. These include most standard windowed controls, such as pushbuttons, list boxes, and edit boxes. While you could derive an original control (one that's not related to any existing control) directly from TWinControl, Delphi provides the TCustomControl component for this purpose. TCustomControl is a specialized windowed control that makes it easier to draw complex visual images.

The section Customizing a Grid - Overview presents an example of creating a windowed control.

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance