Reputation: 11768
I want to implement my own DBGrid my problem is that i don't know much about components how can i override the onkeydown event ?
A tutorial on extending the functionality of components would be great.
Upvotes: 0
Views: 475
Reputation: 22759
You don't override events, but methods that fire them. The OnKeyDown
event is fired by KeyDown method which in turn is called by DoKeyDown method (triggered by the WM_KEYDOWN message). So one of those is the method you have to override in your custom control, depending at which stage you want to intercept the keypress.
BTW there is an exellent article by Peter Below on the internals of how VCL key message processing works: A Key's Odyssey. Make sure you read that as well.
Upvotes: 3