Prvotni verze pro Giteu
This commit is contained in:
52
frmKeyb.pas
Normal file
52
frmKeyb.pas
Normal file
@ -0,0 +1,52 @@
|
||||
unit frmKeyb;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
||||
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Touch.Keyboard, Vcl.StdCtrls;
|
||||
|
||||
type
|
||||
TformKeyb = class(TForm)
|
||||
keyb1: TTouchKeyboard;
|
||||
edtPopis: TEdit;
|
||||
procedure FormShow (Sender: TObject);
|
||||
procedure edtPopisKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
private
|
||||
public
|
||||
text: string;
|
||||
end;
|
||||
|
||||
var
|
||||
formKeyb: TformKeyb;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TformKeyb.edtPopisKeyDown (Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
if (Key=VK_RETURN) then
|
||||
begin
|
||||
text:= Trim(edtPopis.Text);
|
||||
Close;
|
||||
end;
|
||||
|
||||
if (Key=VK_ESCAPE) then
|
||||
begin
|
||||
text:= '';
|
||||
Close;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TformKeyb.FormShow (Sender: TObject);
|
||||
begin
|
||||
edtPopis.Text:= '';
|
||||
edtPopis.SetFocus;
|
||||
end;
|
||||
|
||||
end.
|
||||
Reference in New Issue
Block a user