Good morning to all,
i have a strange behaviour using FNCEdit with autoseparetor set to true, precision set to 2, EditType set etString and working with floatvalue
Case:
2 fncedit component setted as above an
First one dispalyed text is 460,87
Second one dispalyed text s 3.626,54
According to their value i set some gliph as
if FncEdit1.FloatValue<FncEdit2.FloatValue then glyph1.ImageIndex:=0 // Arrow down
else
if FncEdit1.FloatValue>FncEdit2.FloatValue then glyph2.ImageIndex:=1 // ArrowUp
else
glyph2.ImageIndex:=2; // Egual
But with the value as above the FncEdit1.FloatValue<FncEdit2.FloatValue is always false and check step by step i have
FncEdit1.FloatValue = 460.87
FncEdit2.FloatValue = 3.626 // Missing decimal number
Now i'm working convert text to currency removing any '.' char
I know that work with etString and float coulb be strange (if not mistaken) but if i work with etFloat (instead etString) the showed text is always without separetor.
For this you could work with etMoney. This will return a correct conversion.
The etString conversion does not support the floatvalue if there is a thousand separator char included. etMoney first strips the thousand separator and then uses the TryStrToFloat conversion which will include the decimal part. Included is a sample:
For this you could work with etMoney. This will return a correct conversion.
The etString conversion does not support the floatvalue if there is a thousand separator char included. etMoney first strips the thousand separator and then uses the TryStrToFloat conversion which will include the decimal part. Included is a sample: