Board index » delphi » Input Mask for DBEdit?

Input Mask for DBEdit?

I'm a novice to Delphi, which seems to be a delightful program for
programming databases.  But like all novices, there is one small hurdle I
can't seem to clear:  I want to have an edit/input mask for my DBEdit
control.  I am using Paradox 7-type tables through the BDE, but the
picture clause is not being enforced (Isn't this strange?).  I have
scoured the few references I have (including on-line help) and while I do
see the TEditMask component, I do not see an edit mask property for the
DBEdit component.

Can anyone help me out?

Peter McKown


Re:Input Mask for DBEdit?

In order to use an EditMask for a DBEdit, you have to create individual
TField objects, and then set their individual editmasks.

To do this, double-click the TTable or TQuery component to start the
Fields Editor.  If there aren't any fields in the listbox, click the Add
button, and select the fields you want to use.  (BTW, if you Add some, but
not all, of the fields, the ones you do not include will NOT be available
to your application!).

Once you've created the TFields for your database, drop down the list in
the Object Browser; right below your database, you'll see a list of the
fields you created, all starting with the name of your database.  Select
the one you want to set the EditMask for, and VOILA!

Hope this answers your question :-)

Ken White

Other Threads