unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 =
class(TForm)
Edit1: TEdit;
procedure Edit1Change(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
eLetzteEingabe:
String;
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Edit1Change(Sender: TObject);
begin
if length(edit1.Text) >= 8
then
eLetzteEingabe := edit1.Text
else begin
edit1.Text := eLetzteEingabe;
edit1.SelStart := length(edit1.Text)
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
eLetzteEingabe := edit1.Text;
end;
end.