Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Edit Masking for currency and numeric data

1,537 views
Skip to first unread message

Ed Rought

unread,
Aug 29, 1998, 3:00:00 AM8/29/98
to
I know this is probably the stupidest question, but can someone tell how to
properly edit mask a DBEdit or standard Edit for currency values and numeric
values. Using an edit mask with TEditMask seems to have strange behavior to
it. And a help reference other than "EditMask" in the help file would
really help (D3).

Thanks,
Ed Rought
e...@adeptbustech.com

WmBurke(TeamB)

unread,
Aug 29, 1998, 3:00:00 AM8/29/98
to
>>I know this is probably the stupidest question, but can someone tell how to
>>properly edit mask a DBEdit or standard Edit for currency values and numeric
>>values

For currency formatting of float fields, set the TFloatField.Currency property
to True.


Also See TFloatField.EditFormat ie:

MyField.EditFormat := '#0.00'; // 11.00

To edit the field properties in the IDE, double click on the TTable / TQuery object & right
click on the list. Add fields.

Now highlight the desired field and the field's properties can be edited.


=Bill=

Ed Rought

unread,
Sep 2, 1998, 3:00:00 AM9/2/98
to
Bill,
Thanks for the info, but I don't see how that will work for a standard edit
that is not attached to a data field, how do i mask that?

Also when i use a TEditMask with the sample you show below, it always
positions the cursor at the right end and i have to move to the beginning
before anything can be entered, thus quirky behavior. And if there are many
digits, then i have to arrow to the right to the starting position i want or
it gives me an error when leaving the field. For example #0.00 does a __.__
and if i want 1.23 i have to arrow to the 1 position or it will error out.
Is there any clear significant help on how to handle number entry anywhere
that i can download?

Also, am i correct that the TFloatField you referred to is a field in a
table definition that is defined as a numeric field? Have never been able
to find any definitive information in help or books that clearly states that
is what that and several other T types are referring to?
Thanks,
Ed

WmBurke(TeamB) wrote in message <6sa07c$23...@forums.borland.com>...

Frank Cowan

unread,
Sep 2, 1998, 3:00:00 AM9/2/98
to
On Wed, 2 Sep 1998 08:42:20 -0700, "Ed Rought"
<ad...@adeptbustech.com> wrote:

>Bill,
>Thanks for the info, but I don't see how that will work for a standard edit
>that is not attached to a data field, how do i mask that?
>
>Also when i use a TEditMask with the sample you show below, it always
>positions the cursor at the right end and i have to move to the beginning

>Is there any clear significant help on how to handle number entry anywhere
>that i can download?

I don't know if this will help , but its a numeric
entry component:

http://www.fnprg.com/delphi/delphi.html

Frank Cowan, Delphian
http://signaldata.com
See you at ICon 99 in Phila-Delphi-a !

0 new messages