Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: SQL
Expertise: Beginner
Mar 24, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Formatting data

When I set the FormatMask property for a data field object, the value of the field is formatted when a user enters data and tabs out of the field. How can I get formatting information to show up while the user is entering data in the field?

As you have seen, the FormatMask property is used to format the display of data, not the entry of data.

You could set the DefaultValue of the object to show the formatting information and then use the OnKey() method to process keystrokes and format the object's value properly.

To see an example of the OnKey() method at work, check out the question on hiding the value of a field for the entry of a password. You might see something in version 2.0 of OPO that might address your particular problem, too.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date