Subject Re: TIB_Currency unbound formatting
Author mmenaz
The easy solution is try the patched file I've just uploaded ;)
First, remember that for bound controls you don't *need* to set the DisplayFormat property, since the control, if it's not set, takes the one of the dataset column. This, in conjunction with a thorough domain definition and use of related IB_Connection property can make your whole app automatically use the proper display format for your currency data type (domain).
Second, there is a "bug" in the code, I already noticed but was too lazy to fix ;)
The internal "FDisplayEditingFormat" is calculated only when the control is entered (TIB_Currency.CMEnter), so when you assign the value without having entered the control, it's in a wrong state. In addition, the use of the FormatCurrentText procedure in this situation is wrong in any case, since decimal digit format here don't have "0" as a filler (i.e. 1.2 -> 1.20).
In any case, I've uploaded a new version (1.3) on the "file" section of this list. Please, try it an let me know, possibly by direct e-mail if something is still wrong, or if I've introduced other bugs ;)
Marco Menardi