Board index » delphi » How to disable the Hotkey in TDBGrid?

How to disable the Hotkey in TDBGrid?

Hi:
  We derive a new class from the TDBGrid, how can we prevant the
underground TDBGrid from processing some hot-keys such as F2, INSERT,
CTRL-DEL... in our
new class.

-Jodan

 

Re:How to disable the Hotkey in TDBGrid?


Quote
>   We derive a new class from the TDBGrid, how can we prevant the
> underground TDBGrid from processing some hot-keys such as F2, INSERT,
> CTRL-DEL... in our
> new class.

Jodan,

override the KeyDown method the control inherits from TWinControl. This is
a virtual method. Check the virtual key code for the ones you want to trap,
if you see it, do not call the inherited KeyDown method for it. Call it for
all other keys.

Peter Below (TeamB)  100113.1...@compuserve.com)

Other Threads