Article View: borland.public.delphi.winforms.controls.using
Article #222Re: A question about edit component
From: Marc Rohloff TeamB
Date: Sat, 29 Jul 2006 13:44
Date: Sat, 29 Jul 2006 13:44
14 lines
1523 bytes
1523 bytes
On Sat, 29 Jul 2006 09:39:13 -0400, Marc Rohloff [TeamB] wrote:
> if key not in ('0'..'9', #8 {backspace}, #9 {tab} )
> then key := #0;
Sorry I didn't realise that this is was a WinForms question.
The code should be:
if e.KeyChar not in ('0'..'9', #8 {backspace}, #9 {tab} )
then e.Handled := true;
--
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com
Technical Details
Message-ID:
<1q1pffchgvcmm$.dlg@dlg.marcrohloff.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.belwue.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44cafc59$1@newsgroups.borland.com> <ep7kicgj7w5k$.dlg@dlg.marcrohloff.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1eff29,5b381d2c3523b19d X-Google-Attributes: gid1eff29,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Marc Rohloff [TeamB]" <"on request"> Subject: Re: A question about edit component Newsgroups: borland.public.delphi.winforms.controls.using User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit References: <44cafc59$1@newsgroups.borland.com> <ep7kicgj7w5k$.dlg@dlg.marcrohloff.com> Date: Sat, 29 Jul 2006 09:44:24 -0400 Message-ID: <1q1pffchgvcmm$.dlg@dlg.marcrohloff.com> X-Face: "huzh55Xi]!ZNni78>a*5+).`SK?<^q2MlHk-C]Z2M9T@\J5ZCB$95Ey+s"XQuhGFA[eutZ :0^AV!Q;t>gE`1-=8d;HZ6~*o1dH<X9\b$!|(}+I'!Xq)@3Op}%0ArW&nf'Qh*EwR X-Antivirus: avast! (VPS 0630-4, 07/29/2006), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 65.31.1.121 X-Trace: newsgroups.borland.com 1154180662 65.31.1.121 (29 Jul 2006 06:44:22 -0700) Lines: 14 X-Authenticated-User: mrohloff Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.belwue.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail