Board index » delphi » Masked DBEdit : D3

Masked DBEdit : D3

Hi,
Delphi (3) documentation states that a DBEdit can be masked, which is
great, since I want to mask daates to dd/mm/yyy or mm/dd/yyy.

Trouble is, I can't see how to make use of the mask since e.g. the
EditMask property is not published amongst others,

Could someone point out how to do this with a DBEdit, or do I have to
derive a TDBMaskedEdit?

All hints, solutions, chaff, sixpences etc. gratefully appreciated,
TIA
Peter Hill.

 

Re:Masked DBEdit : D3


Quote
Peter Hill wrote:

> Hi,
> Delphi (3) documentation states that a DBEdit can be masked, which is
> great, since I want to mask daates to dd/mm/yyy or mm/dd/yyy.

> Trouble is, I can't see how to make use of the mask since e.g. the
> EditMask property is not published amongst others,

> Could someone point out how to do this with a DBEdit, or do I have to
> derive a TDBMaskedEdit?

> All hints, solutions, chaff, sixpences etc. gratefully appreciated,
> TIA
> Peter Hill.

You have to apply the mask to the underlying TField component. Right
click on the TTable or TQuery containing the field you want to mask,
select the fields editor from the speed-menu, select the field you want
to mask from the list presented, and look in the Object Inspector -
amongst other properties for the field object is one called "EditMask".
Hope this helps,

RBB.

Other Threads