-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathFormMain.pas
More file actions
42 lines (32 loc) · 957 Bytes
/
FormMain.pas
File metadata and controls
42 lines (32 loc) · 957 Bytes
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
unit FormMain;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.ScrollBox,
FMX.Memo, FMX.Controls.Presentation, FMX.Edit;
type
TDebouncedEventDemoForm = class(TForm)
Edit1: TEdit;
Memo1: TMemo;
procedure Edit1ChangeTracking(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
DebouncedEventDemoForm: TDebouncedEventDemoForm;
implementation
uses
UDebouncedEvent;
{$R *.fmx}
procedure TDebouncedEventDemoForm.FormCreate(Sender: TObject);
begin
self.Edit1.OnChangeTracking := TDebouncedEvent.Wrap(self.Edit1ChangeTracking, 500, self);
end;
procedure TDebouncedEventDemoForm.Edit1ChangeTracking(Sender: TObject);
begin
self.Memo1.Lines.Add(FormatDateTime('hh:nn:ss.zzz', Now) + ' - ' + self.Edit1.Text);
end;
end.