-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDW.VCL.DataLink.pas
62 lines (50 loc) · 1.08 KB
/
DW.VCL.DataLink.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
unit DW.VCL.DataLink;
interface
uses
Classes, DB, DW.VCL.Control;
type
TDWDatalink = class(TDataLink)
private
FControl: TDWControl;
procedure UpdateControlState;
protected
procedure ActiveChanged; override;
procedure EditingChanged; override;
procedure LayoutChanged; override;
procedure DataEvent(Event: TDataEvent; Info: NativeInt); override;
property Control: TDWControl read FControl;
public
constructor Create(AControl: TDWControl); reintroduce;
end;
implementation
{ TDWDatalink }
procedure TDWDatalink.ActiveChanged;
begin
UpdateControlState;
inherited;
end;
constructor TDWDatalink.Create(AControl: TDWControl);
begin
inherited Create;
FControl := AControl;
end;
procedure TDWDatalink.DataEvent(Event: TDataEvent; Info: NativeInt);
begin
inherited;
end;
procedure TDWDatalink.EditingChanged;
begin
UpdateControlState;
inherited;
end;
procedure TDWDatalink.LayoutChanged;
begin
UpdateControlState;
inherited;
end;
procedure TDWDatalink.UpdateControlState;
begin
if FControl <> nil then
FControl.Invalidate;
end;
end.