It maybe known to most people but I was recently forced to discover this trick. If you want users to be able to use the up/down arrows to move around dialog boxes as they are often used to doing in other applications you can do it in one step by overriding Application.EventError like this...
Procedure MyApp.EventError{(VAR Event: TEvent)};
begin
case Event.KeyCode of
kbDown: if Current <> nil then
begin
Event.Keycode := kbTab;
Event.Command := kbTab;
Current^.HandleEvent(Event);
end;
kbUp: if Current <> nil then
begin
Event.Keycode := kbShiftTab;
Event.Command := kbShiftTab;
Current^.HandleEvent(Event);
end;
end;
end;
Then, if the current focussed view is one that does not interpret the down/up arrows then it will end
up as an abandoned event and get changed into a TAB.