-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathStringEditorForm.pas
More file actions
57 lines (47 loc) · 1.08 KB
/
Copy pathStringEditorForm.pas
File metadata and controls
57 lines (47 loc) · 1.08 KB
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
53
54
55
56
57
unit StringEditorForm;
interface
uses
{ Winapi }
Winapi.Windows, Winapi.Messages,
{ System }
System.SysUtils, System.Variants, System.Classes,
{ Vcl }
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,
Vcl.ExtCtrls;
type
TFStringEditor = class(TForm)
pnlBackground: TPanel;
pnlBottom: TPanel;
btSave: TButton;
btCancel: TButton;
mmString: TMemo;
procedure btSaveClick(Sender: TObject);
procedure btCancelClick(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FStringEditor: TFStringEditor;
implementation
{$R *.dfm}
procedure TFStringEditor.btCancelClick(Sender: TObject);
begin
ModalResult := mrCancel;
end;
procedure TFStringEditor.btSaveClick(Sender: TObject);
begin
ModalResult := mrOk;
end;
procedure TFStringEditor.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (Key = VK_ESCAPE) then
btCancel.Click
else
if (Key = VK_F7) then
btSave.Click;
end;
end.