Difference between revisions of "TGraphicControl"
(from lcl/controls/tgraphiccontrol.html) |
m (Fixed template loop; wiki markup) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{LanguageBar}} | ||
+ | |||
'''TGraphicControl''' is a base class for lightweight components like [[TBevel]]. | '''TGraphicControl''' is a base class for lightweight components like [[TBevel]]. | ||
Line 10: | Line 12: | ||
If you want to accept keyboard input, or need to support child controls, use a [[TCustomControl]] instead. | If you want to accept keyboard input, or need to support child controls, use a [[TCustomControl]] instead. | ||
+ | |||
+ | Most important members: | ||
+ | |||
+ | * [[procedure Paint]]; | ||
+ | * [[property OnPaint]]: [[TNotifyEvent]]; | ||
+ | * [[property Canvas]]: [[TCanvas]]; | ||
==See also== | ==See also== | ||
− | * [[doc:lcl/controls/tgraphiccontrol.html TGraphicControl doc] | + | * [[doc:lcl/controls/tgraphiccontrol.html|TGraphicControl doc]] |
{{LCL Components}} | {{LCL Components}} |
Latest revision as of 08:36, 30 December 2019
│ English (en) │ suomi (fi) │ русский (ru) │
TGraphicControl is a base class for lightweight components like TBevel.
It supports simple lightweight controls that do not need the ability to accept keyboard input or contain other controls.
Since lightweight controls do not wrap GUI widgets, they use fewer resources than controls based on TWinControl.
TGraphicControl provides a Canvas property for access to the control's drawing surface and a virtual Paint method and an OnPaint handler, called in response to paint requests received by the parent control.
Override the Paint method or supply your own OnPaint handler, to do the actual drawing of the control.
If you want to accept keyboard input, or need to support child controls, use a TCustomControl instead.
Most important members:
See also