TDBGrid Tab & Enter Behavior [SOLVED] lazarus / 16-Databases ---------------------------------------------------------------------- PaulW · 2011-05-15 20:21 I'm working with a TDBGrid and want to control what happens when the Tab or Enter key is pressed.  I find I can do so with the "KeyDown" event, checking for Key = VK_TAB or VK_RETURN.  However, the cell highlight moves to the next cell in the grid.  I want it to just stay where it is and I will take care of things in the "KeyDown" event. Anyone have an idea on how to keep the cell highlight from moving? If not, perhaps I could capture the cell location before the "KeyDown" and then move back to it in the "KeyDown" event.  I don't know at this point how to do either. Thanks in advance. ---------------------------------------------------------------------- 99Percent · 2011-05-16 14:21 assign 0 to the Key var: eg: Key:=0; ---------------------------------------------------------------------- PaulW · 2011-05-16 16:46 @99Percent, You're 100% in my book.  As the Staples' ad goes:  "That was easy!" Thanks for your help. -Paul