Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 07-28-2005, 05:32 PM
jalexm jalexm is offline
Junior Member
 
Join Date: Oct 2004
Posts: 7
Default "Re- sending" a key stroke to the DBGrid

When I put a MainMenu on the form and set some ShortCut keys, the same keys used by a DBGrid are no more available to it. For example, if I include a MenuItem called "New Record" and set its ShortCut to "Ins" then the "Ins" key on DBGrid doesn't work anymore. Is there any way to "re-send" this key to DBGrid? (Note: I can't use DBNavigator and can't use Post, Insert, and any other DB methods).
Reply With Quote
  #2  
Old 07-29-2005, 07:03 AM
paullus paullus is offline
Senior Member
 
Join Date: Jun 2002
Posts: 176
Default RE: "Re- sending" a key stroke to the DBGrid

Try this...

Set the TForm's KeyPreview property to true, then on your TForm's onKeyDown event you treat the key you're trying to use on DGGrid.

If it helped please accept

Paullus Martins de Sousa Nava Castro
Brazil (Brasil)
Brasília - DF
Reply With Quote
  #3  
Old 07-30-2005, 06:20 AM
jalexm jalexm is offline
Junior Member
 
Join Date: Oct 2004
Posts: 7
Default RE: "Re- sending" a key stroke to the DBGrid

Hello, thank you for your answer.
But what you said didn't work, I have tried it before I posted my question here.
MenuItem OnClick event handler captures all key strokes before other event handlers. In fact, I would like MenuItem working with mouse clicks, but not with shortcut keys. But I can't remove the shortcut keys from MenuItem because the name of the keys disappear from menu and they are very important to the user.
Any ideas??? Thank you.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:44 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.