-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathFBase.pas
52 lines (43 loc) · 890 Bytes
/
FBase.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
unit FBase;
interface
uses
System.SysUtils,
System.Types,
System.UITypes,
System.Classes,
System.Variants,
FMX.Types,
FMX.Graphics,
FMX.Controls,
FMX.Forms,
FMX.Dialogs,
FMX.StdCtrls,
FMX.Controls.Presentation,
FMX.ScrollBox,
FMX.Memo;
type
TFrameBase = class(TFrame)
Memo: TMemo;
ToolBar: TToolBar;
LabelCaption: TLabel;
private
{ Private declarations }
protected
procedure Log(const AMsg: String); overload;
procedure Log(const AMsg: String; const AArgs: array of const); overload;
public
{ Public declarations }
end;
implementation
{$R *.fmx}
{ TFrameBase }
procedure TFrameBase.Log(const AMsg: String);
begin
Memo.Lines.Add(AMsg);
Memo.SelStart := Integer.MaxValue; // Scroll to end
end;
procedure TFrameBase.Log(const AMsg: String; const AArgs: array of const);
begin
Log(Format(AMsg, AArgs));
end;
end.