2005. szeptember 5., hétfő

How do I stop my TEdit control beeping?


Problem/Question/Abstract:

If a user hits the enter key in a TEdit box, he is 'rewarded' with an annoying beep.

Answer:

To avoid this, set KeyPreview := True for the form and capture the enter key in the OnKeyPress form event.
If the sender is the editbox, you now can process the return and change it to something else like null before the editbox sees it.

Nincsenek megjegyzések:

Megjegyzés küldése