Mask/Format text during typing

Posted by Lou on April 29, 2005

I have an edit box. While the user is entering numbers, I want dashes inserted at certain points, and a limit on how many numbers can be entered.

IE, I want it to end up like this:


So the dashes are added while the user is typing the number, and only 13 digits can be entered. They also need to be able to delete, and the dashes must remain in the correct places.

I'm totally lost on this. Any tips?

Posted by Giovanni Caramia on May 01, 2005

Drop MaskEdit component on your form. You can find it in Additional Palette.
RightClick on it, click on Input Mask Editor and fill Input Mask as follows:


click Ok button.