 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ian Robinson Guest
|
Posted: Tue Sep 07, 2004 12:20 pm Post subject: How to restrict user input |
|
|
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
|
Posted: Thu Sep 09, 2004 3:15 pm Post subject: Re: How to restrict user input |
|
|
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 |
|
 |
|
|
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
|
|