Board index » delphi » TDBEdit with edit mask

TDBEdit with edit mask

I'm working with Delphi 1.0.

I use TDBEdit components to edit dates and times to in a Paradox table.

Is there a easy possibility to display the edit mask while typing the input
data and without to type the separators '/' or '.' and ':'?

Andreas Jakobsche
http://members.aol.com/AJakobsche/
mailto:AJakobs...@aol.com

 

Re:TDBEdit with edit mask


On 16 Apr 1999 09:33:03 GMT, ajakobs...@aol.com (AJakobsche) wrote:

Quote
>I'm working with Delphi 1.0.

>I use TDBEdit components to edit dates and times to in a Paradox table.

>Is there a easy possibility to display the edit mask while typing the input
>data and without to type the separators '/' or '.' and ':'?

For field editing, masks are set at the field object level and not at the
editing control (such as TDBEdit). For date or date-time fields, use the
EditMask property. At design-time, enter a mask template as the EditMask
property value for a persistent field object through the Fields Editor. For
example:

  #0/#0/##00;1;

At run-time you can set the property programmatically, including situations
where you are not using persistent field objects.

  TDateField(Table1.Fields[2]).EditMask := '#0/#0/##00;1;';

//////////////////////////////////////////////////////////////////////////
Steve Koterski                   "There are two kinds of pedestrians...the
Technical Publications           quick and the dead."
INPRISE Corporation                            -- Lord Thomas Robert Dewar
http://www.borland.com/delphi                                  (1864-1930)

Other Threads