Line | |
---|
1 | unit Area;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Classes, Graphics, Controls;
|
---|
7 |
|
---|
8 | type
|
---|
9 | TArea = class(TGraphicControl)
|
---|
10 | constructor Create(AOwner: TComponent); override;
|
---|
11 | protected
|
---|
12 | procedure Paint; override;
|
---|
13 | end;
|
---|
14 |
|
---|
15 | procedure Register;
|
---|
16 |
|
---|
17 |
|
---|
18 | implementation
|
---|
19 |
|
---|
20 | procedure Register;
|
---|
21 | begin
|
---|
22 | RegisterComponents('C-evo', [TArea]);
|
---|
23 | end;
|
---|
24 |
|
---|
25 | constructor TArea.Create(AOwner: TComponent);
|
---|
26 | begin
|
---|
27 | inherited;
|
---|
28 | Enabled := False;
|
---|
29 | ShowHint := True;
|
---|
30 | end;
|
---|
31 |
|
---|
32 | procedure TArea.Paint;
|
---|
33 | begin
|
---|
34 | if csDesigning in ComponentState then
|
---|
35 | with Canvas do
|
---|
36 | begin
|
---|
37 | Brush.Color := $FF0000;
|
---|
38 | FrameRect(Rect(0, 0, Width, Height));
|
---|
39 | end;
|
---|
40 | end;
|
---|
41 |
|
---|
42 | end.
|
---|
43 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.