Another way of trapping the Enter key is by using the form's KeyPreview property set to true. Then on the Form's onKeyPress event do this:
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
function getControlForNextTabOrder: TComponent;
result := nil;
iThistab := ActiveControl.TabOrder;
for n := 0 to ComponentCount -1 do
if TWinControl(Components[n]).TabOrder = iThisTab +1 then
result := Components[n];
if Key = #13 then
nextComponent := getControlForNextTabOrder();
if (nextComponent <> nil) then
ActiveControl := TWinControl(nextComponent);
Key := #0; // prevent Key from propogating any further
Be aware that TButtons and such will not throw this event handler. So the focus can not move to the next control when this type of component has focus. Memo boxes will get focus, but you have to use Shift+Enter for new lines in the memo. You can obviously curcumvent some of this behavior in the onKeyPress event, by examining the currently ActiveControl type or name.
This example obeys the TabOrder, and prevents you from writing a KeyPress event handler for each control that you want this behaviour.