[Lazarus] Percentage and Currency in MaskEdit
Bart
bartjunk64 at gmail.com
Thu Aug 26 16:20:34 CEST 2010
For example set EditMask to #9999.99;_;1
This will accept numbers with a (optional) preceeding plus or minus
symbol, followed by 4 (optional) digits, a decimal point, followed by
2 (optional) digits.
You might consider replacin the hard coded decimal point with the
value of DecimalSeparator.
The Text property may contain spaces when you read it, which you will
have to filter out before processing.
Another (probably easier) option would be to use a TFloatSpinEdit as
input, and specify Min and Max values and the number of decimals.
Bart
On 8/26/10, ik <idokan at gmail.com> wrote:
> Hello List,
>
> I'm trying to build a small app that should accept percentages of a price
> and also the price itself (regardless of the percentages.
> I'm using TCurrency to save both, however how can I (if it possible) to use
> a Mask for such types of input ?
>
> Thanks,
>
> Ido
> http://ik.homelinux.org/
>
More information about the Lazarus
mailing list