-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathudLocate.pas
50 lines (41 loc) · 1.14 KB
/
udLocate.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
unit udLocate;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TdLocate = class(TForm)
edtLocate: TLabeledEdit;
cbPartialMatch: TCheckBox;
cbCaseInsensitive: TCheckBox;
btnCancel: TButton;
btnOK: TButton;
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
private
{ Private declarations }
public
procedure GetValue(var aValue: String; var aPartial,
aCaseInsensitive: Boolean);
procedure SetUp(aFieldName: String);
{ Public declarations }
end;
implementation
procedure TdLocate.SetUp(aFieldName : String);
begin
edtLocate.EditLabel.Caption := aFieldName;
end;
procedure TdLocate.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = VK_ESCAPE then
Close;
end;
procedure TdLocate.GetValue(var aValue : String;
var aPartial : Boolean; var aCaseInsensitive : Boolean);
begin
aValue := edtLocate.Text;
aPartial := cbPartialMatch.Checked;
aCaseInsensitive := cbCaseInsensitive.Checked;
end;
{$R *.dfm}
end.