Re: Text entry limitation
Jean-Luc Arnaud <jean-luc-E/[email protected]>
| Newsgroups | gmane.comp.lang.realbasic.user |
|---|---|
| Organization | Centre Direct du Multimédia |
| Message-ID | <[email protected]> |
You're right. In addition, what about Return, Enter, Del, arrows, ...? I finally coded that in the KeyDown event of a TextField control: Select Case Key Case "I","V","X","L","C","D","M", Chr(13), Chr(3), Chr(127) Return False Case Chr(9) Décimal_TextField.SetFocus Return True Case Is>=Chr(32) Return True End Select This matches exactly my need (except for Drag/Drop and Paste). Thanks to all replyers Jean-Luc Arnaud Le 18/08/2017 à 11:23, Markus Winter a écrit : >> >> If InStr(TextField1.Text,"LIST OF VALID CHARACTERS") > 0 Then >> >> // Deal with the valid character(s) >> >> Else >> >> // No nothing: reject other characters >> >> End If >> > > That's a srart but not sufficient. The user will still be able to > paste or drag and drop invalid characters. > > Markus > > > To unsubscribe, email us here. <mailto:[email protected]> > To unsubscribe, email [email protected]