was ist neu ¦  programmier tips ¦  indy artikel ¦  intraweb artikel ¦  informationen ¦  links ¦  interviews
 sonstiges ¦  tutorials ¦  Add&Win Gewinnspiel

Tips (1541)

Dateien (137)
Datenbanken (90)
Drucken (35)
Grafik (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Mathematik (76)
Multimedia (45)
Oberfläche (107)
Objekte/
ActiveX (51)

OpenTools API (3)
Sonstiges (126)
Strings (83)
System (266)
VCL (242)

Tips sortiert nach
Komponente


Tip suchen

Tip hinzufügen

Add&Win Gewinnspiel

Werbung

41 Visitors Online


 
...das Problem mit dem verlorenen Fokus im TEdit behandeln?
Autor: Thomas Stutz
[ Tip ausdrucken ]  

Tip Bewertung (5):  
     


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;





 

Bewerten Sie diesen Tipp:

dürftig
ausgezeichnet


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners