Hello
I have created a TEdit instance dynamically and want to check the content when exiting. The procedure to use is the same as for a static TEdit instance. I hope anyone can give me some help. See code below:
TForm1 = class(TForm)
Edit1: TEdit;
procedure Edit1Exit(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
eBox : TEdit;
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
eBox := TEdit.Create(Form1);
eBox.Top := 100;
eBox.left := 100;
eBox.Parent := Form1;
eBox.OnExit:= Edit1Exit(nil); // ???????
end;
procedure TForm1.Edit1Exit(Sender: TObject);
begin
// Check content
end;
end.