General information
Category:
Forms & Form designer
>
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only