четверг, 29 сентября 2016 г.

Как отключить BEEP в TEdit при нажатии Enter?

Нужно просто обнулить переменную Key в обработчике OnKeyPress
procedure TfrmMain.cbxTestCaseFilterKeyPress(Sender: TObject; var Key: Char);
begin
  case Ord(Key) of
    // {Enter} Apply Filter
    13: begin
          actTestCaseFilterApply.Execute;
          Key := #0;
        end;