I'm new to Delphi3 so any help would be appreciated.
Fred
you set the edit mask in the TField object that is associated with the
TDBEdit.
Peter Below (TeamB) 10011...@compuserve.com)
In article <01bce66d$64e3b680$50c5b8cd@fred>, Fred Kreshak wrote:
> From: "Fred Kreshak" <Fred...@ix.netcom.com>
> Newsgroups: borland.public.delphi.vcl.components.using
> Subject: TDBedit editmask - how?
> Date: 1 Nov 1997 02:19:19 GMT
In design mode
TDBedit has an isMasked property but no way to set the mask, nor could
I find a way in the datasource or data set.
There is a Tmaskedit control which you can put on a form. It has an
editmask property and, in the opject inspector you can click on this
property and invoke an edit mask editor dialog. But I see no way to
connect this to the TDBedit control or to the datasource or dataset.
I found in one book that you can do this programmatically, e.g.:
Table1SocialSecurity.editMask := '000\-00\-000;1;_'
but I have not tried this
Is this the only way to set an editmask on a database field?
Fred
Peter Below <10011...@compuserve.com> wrote in article
<VA.000007cf.000b050c@petersnewbox>...
No. Here are the steps:
1. Drop a TTable (or TQuery) on your form or data module.
2. Set the TTable.DataBaseName property
3. Set the TTable.TableName property
4. Double-click the TTable component to bring up the Fields Editor
5. Right-click the Fields Editor to bring up the context menu
6. Select the Add Fields menu item
7. Select fields you wish to add, and click the OK button
8. Pressing OK in #7 returns you to the Fields Editor
9. In the Fields Editor, select ONE of the fields you added
10. #9 will select the field component in the Object Inspector
11. Look at the field's properties in the Object Inspector
12. One property is called EditMask. That's the one you want.
--
Rick Rogers (TeamB) | Fenestra Technologies
Rick Rogers [TeamB] <ri...@fenestra.com> wrote in article
<VA.00000b4...@Rosetta.fenestra.com>...
An exhaustive explanation of the issue is included in both the on-line
help and the paper documentation. See the help topic "Working with
field components" (search for field in the index) and the subsequent
topics, which you can access with the >> button. The documentation on
these topics is actually quite well written and complete.
Look at the DBVldEdit Component, this object is an alternative for the
DBEdit object.
enhanced capailities are
· Validating data Before leaving the field
· Maintaining Focus and Caret after showing messages
· Instant trapping of Required fields
· Suspending validation on special events
· Filling of default values on creating new records
· MaskEdit capabilities
· Alert beep controlable
Description:
Added is an OnValidate event to check data before leaving the field.( the
OnExit event is
executed after leaving the field). It leaves the focus on the DBVldEdit
field.
Tabbing trough other fields (or controls) or clicking another object
invokes the event to
happen.
To insure that the validation can be overridden, a property CtlNames is
created which is a
list of controls that can be set that do not invoke the OnValidate
event.(for instance an Find
Button to lookup some value in a second form)
When adding a new record defaults can be filled out from the component
itself. It has a
property that can be filled out for this purpose.
The EditMask propertyis added so data can be formatted when entered. It
works as the
normal EditMask property on an MaskEdit component.
Beeping can be toggled on the validation When the message you generate
beeps also it can
get annoying for the End User.
It can be found at: Http://www.skzl.nl/~jvdvelde
Kind regards, Sjef van der Velde