I have two TEdit controls. When I exit edit1, edit2 gets focus. In my OnExit Edit1 event, I have the following code:
procedure TForm1.Edit1Exit(Sender: TObject);
begin
edit2.Enabled := false;
edit2.Enabled := true;
edit2.setfocus;
end;
Edit2 has focus. However, it does not have a carriage. I can start typing, but this is confusing because I don’t know whose control has the focus.
What interests me more is that with the flip, the Enabled Property, which triggers some messages, is firing properly? For example, the edit2 OnEnter event does not fire.
This is on the D2006, if that matters at all.
Thanks for the answer.
source
share