|
| WD22/WB22 - DUTCH car license plate input mask |
| Iniciado por guest, 02,ago. 2018 13:11 - 3 respuestas |
| |
| | | |
|
| |
| Publicado el 02,agosto 2018 - 13:11 |
Hi,
does someone already have a input check/mask for DUTCH car license plates. Like a regular expression or a small procedure? |
| |
| |
| | | |
|
| | |
| |
| Publicado el 02,agosto 2018 - 17:07 |
Hello Arie,
I use the code below in the whenever modifying section of the edit box;
IF Length(MySelf)="" THEN RETURN
MySelf..DisplayEnabled = False
let nCur = MySelf..Cursor - CharactTypeOccurrence(MySelf[[TO MySelf..Cursor]],ctPunctuation) MySelf = StringFormat(MySelf,ccIgnorePonctuationAndSpace) let n = 1 let nType = CharactType(MySelf[[n]]) let nCount = 0 WHILE n <= Length(MySelf) IF CharactType(MySelf[[n]]) <> nType THEN // Character type changed nType = CharactType(MySelf[[n]]) MySelf[[n]]="-"+MySelf[[n]]
nCount=1 IF nCur>n THEN nCur++ n++ ELSE IF nCount = 3 THEN // A series of 4 characters of the same type: add separator MySelf[[n-1]]="-"+MySelf[[n-1]]
nCount=1 IF nCur>n THEN nCur++ n++ ELSE nCount++ END END n++ END
MySelf..Cursor = nCur MySelf..DisplayEnabled = True |
| |
| |
| | | |
|
| | |
| |
| Publicado el 03,agosto 2018 - 09:32 |
| Works great Sammy, thanks! |
| |
| |
| | | |
|
| | |
| |
| Publicado el 03,agosto 2018 - 16:25 |
| |
| |
| | | |
|
| | | | |
| | |
|