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 | |
---|
1 | unit Area;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Classes,
|
---|
7 | {$IFDEF DPI}Dpi.Graphics, Dpi.Controls{$ELSE}
|
---|
8 | Graphics, Controls{$ENDIF};
|
---|
9 |
|
---|
10 | type
|
---|
11 | TArea = class(TGraphicControl)
|
---|
12 | constructor Create(AOwner: TComponent); override;
|
---|
13 | protected
|
---|
14 | procedure Paint; override;
|
---|
15 | end;
|
---|
16 |
|
---|
17 | procedure Register;
|
---|
18 |
|
---|
19 |
|
---|
20 | implementation
|
---|
21 |
|
---|
22 | procedure Register;
|
---|
23 | begin
|
---|
24 | RegisterComponents('C-evo', [TArea]);
|
---|
25 | end;
|
---|
26 |
|
---|
27 | constructor TArea.Create(AOwner: TComponent);
|
---|
28 | begin
|
---|
29 | inherited;
|
---|
30 | Enabled := False;
|
---|
31 | ShowHint := True;
|
---|
32 | end;
|
---|
33 |
|
---|
34 | procedure TArea.Paint;
|
---|
35 | begin
|
---|
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;
|
---|
42 | end;
|
---|
43 |
|
---|
44 | end.
|
---|
45 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.