source: branches/delphi/Area.pas

Last change on this file was 2, checked in by chronos, 7 years ago
File size: 625 bytes
Line 
1unit Area;
2
3interface
4
5uses
6 WinProcs, Classes, Graphics, Controls;
7
8type
9 TArea = class(TGraphicControl)
10 constructor Create(aOwner: TComponent); override;
11 protected
12 procedure Paint; override;
13 end;
14
15procedure Register;
16
17
18implementation
19
20procedure Register;
21begin
22RegisterComponents('Samples', [TArea]);
23end;
24
25constructor TArea.Create;
26begin
27inherited Create(aOwner);
28Enabled:=false;
29ShowHint:=true;
30end;
31
32procedure TArea.Paint;
33begin
34if csDesigning in ComponentState then
35 with Canvas do
36 begin Brush.Color:=$FF0000; FrameRect(Rect(0,0,width,height)) end
37end;
38
39end.
40
Note: See TracBrowser for help on using the repository browser.