delphi 1.0 masked edit controls

In article <4p5iap$...@news2.cais.com> st...@scaryland.com (Steven W. Mentzer) writes:

Quote
>From: st...@scaryland.com (Steven W. Mentzer)
>Subject: delphi 1.0 masked edit controls
>Date: 6 Jun 1996 03:12:25 GMT
>I am having a problem of sort right now. We are re-writing some of our code
>which was using an Advanced Revelation Database front end to delphi 1.0&2.0.
>Our problem is that we have noticed that several data types that are supported
>by whatever table structure we are using (paradox at this time) are not being
>formatted in the actual edit field.
>For instance:
>  Date fields -

>    Our old database would allow input of
>     "3-1"
>     "3-1-96"
>     "03-01-96"

>     etc to represent the date of "03-01-1996". We have not been able
>     to determine if there is the capability in delphi to automatically
>     convert these values into its own internal representation and format the      
>     fields correctly on the page when the use loads the record.

>  Numbers are also a big problem. We like to display our numbers containing
>  commas when they are being viewed. Is there are way to do this under delphi
>  without having to derive a new class from TDBEdit and modify the WM_PAINT
>  procedure?

The MaskEdit property of the TField should handle the comma issue......

You can also write your own 'Convert to Display Data' routine via the SetText
event of the TField and vice versa a 'Convert from Display to Internal Format'
via a GetText event that you write.

Again writing you own code to take the data in its internal format and giving
the string to Delphi and the opposite coming back should/would wokr for the
date format stuff.

Walter.