-
Notifications
You must be signed in to change notification settings - Fork 19
/
unInputMemo.pas
47 lines (39 loc) · 917 Bytes
/
unInputMemo.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
unit unInputMemo;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, TntStdCtrls, ExtCtrls, TntForms;
type
TfmInputMemo = class(TTntForm)
Panel1: TPanel;
Panel2: TPanel;
lab1: TTntLabel;
Ed: TTntMemo;
PanelBtn: TPanel;
btnCancel: TTntButton;
btnOK: TTntButton;
procedure FormResize(Sender: TObject);
procedure EdKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
private
{ Private declarations }
public
{ Public declarations }
end;
implementation
{$R *.dfm}
procedure TfmInputMemo.FormResize(Sender: TObject);
begin
PanelBtn.Left:= (Panel1.ClientWidth - PanelBtn.Width) div 2;
end;
procedure TfmInputMemo.EdKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (Key=vk_escape) then
begin
ModalResult:= mrCancel;
Key:= 0;
Exit
end;
end;
end.