delphi - Why won't my control accept keyboard input? -


i've built custom control i'm trying send input to. accept mouse input , report mousedown, mousemove , mouseup correctly, whatever reason, won't accept keyboard input. when click on it, doesn't receive focus, , keys press interpreted whatever control had focus already.

this simple. first place thought in controlstyle property, thing can see in helpfile keyboard input csnostdevents, disables it, , control doesn't have that. need make control can receive input focus?

a few things try:

  • on mousedown, call windows.setfocus(handle). in experience, winapi function setfocus works better vcl's setfocus method.
  • in response wm_getdlgcode message, reply message.result := message.result or dlgc_wantchars or dlgc_wantarrows or dlgc_wanttab or dlgc_wantallkeys;

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -