Article View: borland.public.delphi.language.objectpascal
Article #131processing keystrokes
From: schumacker
Date: Mon, 16 Feb 2004 10:38
Date: Mon, 16 Feb 2004 10:38
30 lines
1623 bytes
1623 bytes
hi everyone! i want to do the following: i have a TEdit. i want to press a key whit that TEdit as the focus. i want to see the key pressed, and then, if is a valid key for me, write it into the TEdit, and if is not valid, i dont want to write anything. Let me show you an example: my valid keys are, for example: 'a', 'b', 'c' i press the 'p' key over the TEdit. It�s not a valid key, so i dont want nothing new in the TEdit. Now i press the 'b' key over the TEdit. It�s a valid key, so i want a 'b' in my TEdit. �How can i do this? I tried with the OnKeyDown, OnKeyUp and OnKeyPressed events. With them i can only see if the key pressed is valid or not, but i cant avoid the character to be shown in the TEdit. �Anyone have any idea? Please help me. Thanx Schumacker
Technical Details
Message-ID:
<e1eadaf3.0402160238.4883d462@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 109d30,f036e8073f8ad456,start X-Google-Attributes: gid109d30,public X-Google-ArrivalTime: 2004-02-16 02:38:11 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: miguelcampoy@hotmail.com (schumacker) Newsgroups: borland.public.delphi.language.objectpascal Subject: processing keystrokes Date: 16 Feb 2004 02:38:11 -0800 Organization: http://groups.google.com Lines: 30 Message-ID: <e1eadaf3.0402160238.4883d462@posting.google.com> NNTP-Posting-Host: 80.28.46.60 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1076927891 7764 127.0.0.1 (16 Feb 2004 10:38:11 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 16 Feb 2004 10:38:11 +0000 (UTC)