I know that navigation keys (Tab, BackTab, the arrow keys, and so on) are unaffected by KeyPreview because they do not generate keyboard events.
But I really want to handle Navigation keys with OnKeyDown event.
I added the codes as follows, but it still does not work:
procedure WMGetDlgCode(var Message : TWMGetDlgCode); message WM_GETDLGCode;
// Let the control see the arrow keys and the tab key
procedure TTVDGLEdit.WMGetDlgCode(var Message : TWMGETDLGCODE);
begin
Message.Result := Message.Result + DLGC_WANTARROWS + DLGC_WANTTAB;
end;
Thanks for any advice.
But I really want to handle Navigation keys with OnKeyDown event.
I added the codes as follows, but it still does not work:
procedure WMGetDlgCode(var Message : TWMGetDlgCode); message WM_GETDLGCode;
// Let the control see the arrow keys and the tab key
procedure TTVDGLEdit.WMGetDlgCode(var Message : TWMGETDLGCODE);
begin
Message.Result := Message.Result + DLGC_WANTARROWS + DLGC_WANTTAB;
end;
Thanks for any advice.