0
I have the following code at the events:
Onexit:
procedure TFEqt_Pallet.EdNr_PalletExit(Sender: TObject);
var
MeuKey: word;
begin
MeuKey := 13;
EdNr_PalletKeyDown(EdNr_Pallet,MeuKey,[]);
end;
Onkeydown:
procedure TFEqt_Pallet.EdNr_PalletKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Ord(key) = 13 then
begin
...
proximocampo.setfocus;
end;
When I enter the component it is calling the Onexit method twice. How can I resolve this?
It is not right to call an event from within another event. Rephrase your logic so that it does not occur.
– Reginaldo Rigo