forked from rejetto/hfs2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
longinputDlg.pas
44 lines (36 loc) · 945 Bytes
/
longinputDlg.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
unit longinputDlg;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TlonginputFrm = class(TForm)
bottomPnl: TPanel;
okBtn: TButton;
cancelBtn: TButton;
topPnl: TPanel;
msgLbl: TLabel;
inputBox: TMemo;
procedure bottomPnlResize(Sender: TObject);
procedure inputBoxKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
private
{ Private declarations }
public
{ Public declarations }
end;
implementation
{$R *.dfm}
procedure TlonginputFrm.bottomPnlResize(Sender: TObject);
begin
okBtn.left:=(bottomPnl.Width-cancelBtn.BoundsRect.right+okBtn.BoundsRect.left) div 2;
cancelBtn.left:=okBtn.BoundsRect.Right+10;
end;
procedure TlonginputFrm.inputBoxKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if shift = [ssCtrl] then
if key = ord('A') then
inputBox.SelectAll();
end;
end.