Page 1 of 1

Errors with CurrencyOptions

PostPosted: 18 Jul 2017 18:21
by esthermann
Hey Guys, having an issue with the CurrencyOptions when I am programmatically adjusting the data in a field. The field data is a float field. It appears that the control is deleting trailing 0 which is then changing the value.

for example when my value is

Val 11333 (0x2C45) it correctly formats and displays as $113.33
correctValuesCode.png

correctValuesScreen.png


However when my value is:

Val 11250 (0x2BF2) it is INCORRECTLY formatted as $11.25
IncorrectMaskingCode.png

IncorrectMaskingResults.png


The only difference between this and the other edit boxes on my form is that this control is a calculated control which doesn't accept user input. When I manually type a number containing a trailing 0 into any other edit box, it is correctly formatted. Additionally, this control also shows leading zeros.

A value of:

Val 1250 (0x4E2) will produce results of $01.25 which is not correct

Also I am trying to upload photos which show the issue to the forum and I am getting the following error
Could not upload attachment to ./files/84_d2d1bcbc99e80165ebd67c9318c5e945.

IntraWeb 14.1.14
Version: 14.1.14
Build Date: 20170511

CGDevTools
Version: 3.5.0.231
Licensed: Id: 4277

Re: Errors with CurrencyOptions

PostPosted: 19 Jul 2017 09:40
by Alexander Bulei
Hi esthermann,

It would be helpful, if you post your edit settings/options here...

Best Regards.

Re: Errors with CurrencyOptions

PostPosted: 20 Jul 2017 16:38
by esthermann
I was able to post the images today. Also here are the CurrencySettings designtime in my code.

Please note, this is not an issue when the value is typed manually into the code. This is ONLY an issue when the calculated value is programmatically written to the control.

Re: Errors with CurrencyOptions

PostPosted: 24 Jul 2017 09:35
by Alexander Bulei
Hi estherman,

I don't see any issues here on doing this:

delphi code
IWCGJQEdit2.Text:= '11250';


Please check/debug the value after of convert to string.

Best Regards.