Subject IB_Currency is coming... need your last feedback before release to Jason
Author Marco Menardi
I've completed the base functionality of a IB_Currency component, a
component for entering numeri values like currency. I hope Jason will
like it and include in the next release, even if as it's "beta"
version, but it's quite stable :)

What already works:
==================
-Right aligned field with formatting while entering data
-You can have a fixed number of decimals
How does it work?
You can specify DisplayFormat (yes, NOT edit format) for the field
like ",0.00" or ",0" or ",0.###" and it will be used for formatting
and for taking the max number of decimal digits allowed (it counts the
number of the 0/9/# chars after the decimal separator). It uses the
standard formatting routine, so you can use formats like "$ ,0.00"
too.

What don't work (but it will ;)
===============================
Drop down button don't work, and if you try to drop down probably a
conversion error is given. This will be fixed when I will implement a
drop down calculator (see below).

What is planned in the near future
==================================
I'm planning the possibility to convert from two currencies, like the
Euro-Lira problem we will have in Italy.
You will specify the actual currency used prefix (i.e. Eur), the
"foreign" currency prefix (i.e. Lit), the keyboard ShortCut to fire
the conversion (i.e. 'E'). At last you enter the conversion factor
from foreing to actual currency (i.e. actual:=foreign/1936.27). The
conversion will be possible only inside the drop down calculator (I
want to add a calculator with free floating point math -no fixed
number of decimals-. This because the field has only one
DisplayFormat, so you could not enter currency that have different
needs before being converted).
A fixed special shortcut ('C') is provide for clearing the field.

I would like to name the properties:
ForeignToActualRatio = the ratio conversion from Foreign to Actual
(Foreign/Ratio=Actual)
ActualPrefix = the short (max 3 char) prefix of the actual currency.
You can enter symbols (i.e. '$') as well.
ForeingPrefix = the same for foreign currency
ConversionShortCut = the key (a-z) to hit to fire the conversion. If
empty you have to use the button on the calculator (the one labelled
with the two prefix and an arrow (i.e. 'Eur->Lit' or '$->£').
Any (naming) suggestion?

I don't think that a two way conversion would be useful, since you
store data into the same currency (i.e. Dollars) but could have input
in a different one (i.e. Canadian dollars, Pounds, Lira...).
You could use the dropdownbutton click event to set currency
conversion property "on the fly", maybe based on a previously selected
set (I mean, the user select from a list box the currency he has to
convert from, then enters IB_Currency, drops down the calculator,
enters the foreign value, presses the conversion button, it's done!)
Maybe could be useful an "drop down calculator when enter" property,
or let the conversion take place even if the calculator is not dropped
down, so you can specify a "large" decimal range (i.e. 2 digits even
if your actual currency has 0) and let the component and Ibo perform
the conversion and the rounding to the field precision (i.e.
Numeric(15,0)).
What about rounding? There are 3 possibility: the one that uses Delphi
with Round(), the usual ".5" included go to up, truncation. One more
property to set it?


All your suggestions and feedback are welcome


Thanks
Marco Menardi
mmenaz@...