To Reproduce the Problem:
Um das Problem nachzuvollziehen:
1. Drop two TEdits onto a form.
Plaziere zwei TEdits auf einer Form.
2. In the OnExit Event of Edit1 add the following code:
Im OnExit Ereignis von Edit1 schreibe diesen Code:
Application.MessageBox( "Title","...", mb_ok );
3. Run the application.
Starte die Anwendung.
4. First select Edit1 then Edit2
Klicke auf Edit und dann auf Edit2
5. The Message box is shown.
Click the OK button, and the Caret has dissapeared!
Eine MessageBox wird angezeigt.
Klicke auf den OK Button und der Cursor ist verschwunden!
6. How to handle this:
Wie man das umgehen kann:
procedure TForm1.Edit1Exit(Sender: TObject);
begin
Application.MessageBox("qq","qq",mb_ok);
if Assigned(ActiveControl) then
PostMessage(ActiveControl.Handle,WM_SETFOCUS,0,0);
end;
Если Вас заинтересовала или понравилась информация по разработке на Delph - "Проблема потери фокуса для TEdit", Вы можете поставить закладку в социальной сети или в своём блоге на данную страницу: Так же Вы можете задать вопрос по работе этого модуля или примера через форму обратной связи, в сообщение обязательно указывайте название или ссылку на статью!