source: trunk/Packages/CevoComponents/Area.pas

Last change on this file was 471, checked in by chronos, 6 months ago
  • Fixed: More units uses items corrected for high DPI support.
File size: 728 bytes
Line 
1unit Area;
2
3interface
4
5uses
6 Classes,
7 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls{$ELSE}
8 Graphics, Controls{$ENDIF};
9
10type
11 TArea = class(TGraphicControl)
12 constructor Create(AOwner: TComponent); override;
13 protected
14 procedure Paint; override;
15 end;
16
17procedure Register;
18
19
20implementation
21
22procedure Register;
23begin
24 RegisterComponents('C-evo', [TArea]);
25end;
26
27constructor TArea.Create(AOwner: TComponent);
28begin
29 inherited;
30 Enabled := False;
31 ShowHint := True;
32end;
33
34procedure TArea.Paint;
35begin
36 if csDesigning in ComponentState then
37 with Canvas do
38 begin
39 Brush.Color := $FF0000;
40 FrameRect(Rect(0, 0, Width, Height));
41 end;
42end;
43
44end.
45
Note: See TracBrowser for help on using the repository browser.