Forum > Windows

[solved] need help for TEDIT component

<< < (3/3)

Thaddy:

--- Quote from: compispezi@web.de on August 07, 2022, 10:43:19 am ---Tab and ESC is not the usual way while input datas.
I only would use keydown, keyup and Enter.

--- End quote ---
Note KeyDown is repeating and KeyUp and Enter/Return are single shot. KeyDown should only be used if you need continuous control (navigate, game play) and expensive. The other two are usually much better options.

compispezi@web.de:
Thank you for the very good tips. The resolution is:

procedure TForm1.Edit2KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState
  );
begin
      case key of
      38      : Edit1.SetFocus; //hoch
      40,13 : Edit3.SetFocus  //runter, Enter
      end;

end;             

So the question is solved.

Navigation

[0] Message Index

[*] Previous page

Go to full version