Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Input Mask
Message
From
13/01/1997 19:16:25
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00017229
Message ID:
00017246
Views:
63
>
>I would but, I am using different masks at runtime depending on user
>input. Thanks for the reply.
that wasn't really a relply - just a thought
here is something that I hope will be of more help

one option you have is when the control accepts the focus
use the KEYBOARD command to key in the letters needed
the problem of course is that it doesn't functon like the input mask -- it is however simple

if you really need an input mask -like behaviour you can do it as well (it requieres some more work though) - subclass the textbox
and add a property that will hold a mask
also add a method that will do the checkups
and trap everykey in the keypress event
send it to be analysed in the check method - the easiest way is to save the state of the control,call the default keypress event for textboxes, and then check the new value is it meets the critiria return .t.
if not re-place the value with the old one
don't forget to put NODEFAULT on the keypress event so the keystroke will not be processed twice

I used this technique successfully to extend the Inputmask options

Arnon
Previous
Reply
Map
View

Click here to load this message in the networking platform