31 |
|
|
32 |
|
uses |
33 |
|
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, DbCtrls, |
34 |
< |
ExtCtrls, IBSQLParser, DB, StdCtrls, IBCustomDataSet, LCLVersion; |
34 |
> |
ExtCtrls, IBSQLParser, DB, StdCtrls, IBCustomDataSet; |
35 |
|
|
36 |
|
type |
37 |
|
|
54 |
|
FOwner: TIBLookupComboEditBox; |
55 |
|
protected |
56 |
|
procedure ActiveChanged; override; |
57 |
+ |
procedure DataEvent(Event: TDataEvent; Info: Ptrint); override; |
58 |
|
procedure RecordChanged(Field: TField); override; |
59 |
|
procedure UpdateData; override; |
60 |
|
public |
77 |
|
|
78 |
|
TIBLookupComboEditBox = class(TDBLookupComboBox) |
79 |
|
private |
79 |
– |
FCanAutoInsert: TCanAutoInsert; |
80 |
|
{ Private declarations } |
81 |
|
FDataLink: TIBLookupComboDataLink; |
82 |
|
FIBLookupControlLink: TIBLookupControlLink; |
147 |
|
|
148 |
|
implementation |
149 |
|
|
150 |
< |
uses IBQuery, LCLType, Variants, LCLProc, LazUTF8; |
150 |
> |
uses LCLType, Variants, LCLProc, LazUTF8; |
151 |
|
|
152 |
|
{ TIBLookupControlLink } |
153 |
|
|
169 |
|
FOwner.ActiveChanged(self) |
170 |
|
end; |
171 |
|
|
172 |
+ |
procedure TIBLookupComboDataLink.DataEvent(Event: TDataEvent; Info: Ptrint); |
173 |
+ |
begin |
174 |
+ |
inherited DataEvent(Event, Info); |
175 |
+ |
if Event = deLayoutChange then |
176 |
+ |
FOwner.LookupCache := FOwner.LookupCache; {sneaky way of calling UpdateLookup} |
177 |
+ |
end; |
178 |
+ |
|
179 |
|
procedure TIBLookupComboDataLink.RecordChanged(Field: TField); |
180 |
|
begin |
181 |
|
FOwner.RecordChanged(self,Field); |
195 |
|
{ TIBLookupComboEditBox } |
196 |
|
|
197 |
|
procedure TIBLookupComboEditBox.HandleTimer(Sender: TObject); |
191 |
– |
var ActiveState: boolean; |
198 |
|
begin |
199 |
|
FTimer.Interval := 0; |
200 |
|
FFiltered := Text <> ''; |