BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to restrict user input

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.databases
View previous topic :: View next topic  
Author Message
Ian Robinson
Guest





PostPosted: Tue Sep 07, 2004 12:20 pm    Post subject: How to restrict user input Reply with quote



Hi,

D5.

I am trying to restrict my users from being able to enter more than 2
decimal places into a dbedit field. Any ideas ?

TIA

--
Best regards
Ian Robinson FOREST SOFTWARE
+44(0)1594 564457 (Office)
+44(0)7718 806 006 (UK Mobile)
+34 653 209 592 (Overseas Mobile)
+44(0)1594 564038 (Out of hours support)
Back to top
Snide
Guest





PostPosted: Thu Sep 09, 2004 3:15 pm    Post subject: Re: How to restrict user input Reply with quote



intercept keystrokes with an onkeydown event, and test what is in the field
so far. You can easily check wether a decimal place has been typed and how
many digits there are.
discard any digit keying if required by setting Key:=0.

Denis


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.