Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi TCustomControl und Tastaturereignisse (https://www.delphipraxis.net/52374-tcustomcontrol-und-tastaturereignisse.html)

DevilsCamp 29. Aug 2005 09:11


TCustomControl und Tastaturereignisse
 
Ich habe eine Komponente als Nachfahres eines TCustomControl erstellt.

Nun habe ich das Problem, dass diese Komponente NICHT auf Tastatur-Ereignisse reagiert.
Weder, wenn ich WM_KEYDOWN abfange, noch wenn ich self.OnKeyDown benutze.

Beim Test-Form habe ich KeyPReview auf False stehen.

Kann mir jemand helfen?

DevilsCamp 29. Aug 2005 09:36

Re: TCustomControl und Tastaturereignisse
 
Habe eine (wenn auch nicht gerade schöne) Lösung gefunden.

Wenn ich WM_LBUTTONDOWN verarbeite, dann rufe ich self.SetFocus auf.


Aber vielleicht hat hier jemand eine schönere Lösung?


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:05 Uhr.

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