开发者

How can I handle arrow keys in a custom component in delphi?

I'm using delphi XE. I'm developing a component that is come from TPanel. TApGUITab=class(Tpanel) I handled key down event by handling WMKeyDown message, but it isn't called when I press arrow keys and it sets focus to another control instea开发者_开发问答d of calling the event. What should I do now?


This is easy. Just respond to the WM_GETDLGCODE message and return

Message.Result := Message.Result or DLGC_WANTCHARS or
                                     DLGC_WANTARROWS or DLGC_WANTTAB or
                                     DLGC_WANTALLKEYS;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜