• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1935
  • Last Modified:

SetFocus of LabelEdits ,editboxes.

I amek an appliocation in Delphi 7 and i have a form with some LabelEdits,editboxes e.t.c. and i work on keypress event

=================
   if key=#13 then
  begin
    LabelEdit2.SetFocus;
  end;
=================

 to set the focus to the next labeledit or editbox or whatelse, each time the user hit the enter button.Everything it is ok but when you press the enter button it makes a pestilential noise ("ntoug ":) ).How can i pass this horrible noise?

Thanks in advance!
0
Alex
Asked:
Alex
1 Solution
 
kretzschmarCommented:
simple try this change

  if key=#13 then
  begin
    key := #0;
    LabelEdit2.SetFocus;
  end;

not tested

meikl ;-)
0
 
AlexSoftware EngineerAuthor Commented:
Hi kretzschmar,

Yes, this is a very quick solution thanks a lot!!!!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now