Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Focus ändern? (https://www.delphipraxis.net/30487-focus-aendern.html)

malo 25. Sep 2004 14:37


Focus ändern?
 
Und zwar hab ich folgendes Problem:

Ich hab in meinem Programm im OnCreate-Verfahren ein zweites Form in Form eines Textfensters eingebaut. Nur, wenn ich jetzt das Programm starte, hat mein Mainform den Focus, nicht mein "Textfeld". Wie kann ich das ändern?

Dax 25. Sep 2004 14:40

Re: Focus ändern?
 
Im Form2.OnShow setzt du einfach mit TEdit.SetFocus den Focus auf dein Edit-Feld.

ipworks 25. Sep 2004 14:42

Re: Focus ändern?
 
Hi,
"Textfeld" ist das ein TEdit oder das zweite Form?
Bei TEdit:
Delphi-Quellcode:
TEdit.Setfocus;
Bei zweitem Form:
Setze OnCreate auf OnShow... und
Delphi-Quellcode:
Form2.Show;
Form2.SetFocus;
c u
Peter

malo 25. Sep 2004 14:47

Re: Focus ändern?
 
Ich meinte eigendlich kein edit, sondern ein Form, aber egal ;)

Naja, danke für die Antworten. Thema hat sich erledigt, hab grade noch was tolles gefunden: ShowModal :)


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:29 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz