Board index » cppbuilder » Beeping TextEdit

Beeping TextEdit


2006-01-15 08:28:02 AM
cppbuilder112
Whenever I finish editing a TextEdit or LabeledTextEdit box by hitting the
<Enter>key I get this beep like when you do an invalid keystroke. In my
case this is definitely not an invalid keystroke as it triggers my
validation method written in the OnKeyPress event. Everything works nicely
but it is rather annoying. How can I get the app to accept this as a valid
keystroke and be quiet?
My OnKeyPressed event will start like this
void __fastcall TForm1::AmountLbEditKeyPress(TObject *Sender, char &Key)
{
switch (Key){
case VK_RETURN : .......................................and so on.
--
Perre
Symfoni, en kost- och träningsdagbok
www.kostforum.se
 
 

Re:Beeping TextEdit

"Per Elmsäter" < XXXX@XXXXX.COM >wrote in message
Quote
Whenever I finish editing a TextEdit or LabeledTextEdit box by hitting the
<Enter>key I get this beep like when you do an invalid keystroke. In my
case this is definitely not an invalid keystroke as it triggers my
validation method written in the OnKeyPress event. Everything works nicely
but it is rather annoying. How can I get the app to accept this as a valid
keystroke and be quiet?
Set Key to 0 before you exit the event handler.
HTH
Jonathan
 

Re:Beeping TextEdit

Jonathan Benedicto wrote:
Quote
Set Key to 0 before you exit the event handler.

HTH

Jonathan
Thanks. Works nicely.
Sometimes the solution is just too easy ;))
--
Perre
Symfoni, en kost- och träningsdagbok
www.kostforum.se
 

{smallsort}