Board index » delphi » Can't capture the TAB key in the edit box

Can't capture the TAB key in the edit box

Hi,

In my edit box, I tried to capture the TAB key in both KeyDown/KeyPress, but neither event seemed to have been triggered. I also doing the same with the form's KeyDown/KeyPress events and those aren't fired either. Does anybody know how I can do this? OnExit won't work for me, because TAB does something a little different than when the user clicks a different control.

Thanks,
Lawrence

 

Re:Can't capture the TAB key in the edit box


set the keypreview property of the form to true

Quote
"Lawrence Tse" <l...@safe.com> wrote in message

news:3e775876$1@newsgroups.borland.com...
Quote

> Hi,

> In my edit box, I tried to capture the TAB key in both KeyDown/KeyPress,

but neither event seemed to have been triggered. I also doing the same with
the form's KeyDown/KeyPress events and those aren't fired either. Does
anybody know how I can do this? OnExit won't work for me, because TAB does
something a little different than when the user clicks a different control.
Quote

> Thanks,
> Lawrence

Other Threads