FloatSpinEditEx truncating decimals
Original Reporter info from Mantis: wp @wpam
-
Reporter name:
Original Reporter info from Mantis: wp @wpam
- Reporter name:
Description:
If the value of pi (3.1415926563) is assigned to the Value of a TFloatSpinEditEx in the OnCreate event, the string "3.14" is displayed initially - which is correct because the default value of the DecimalPlaces is 2. But if the DecimalPlaces are incremented later only zeros are added to the 3.14.
On the other hand, when pi is assigned to the FloatSpinEditEx later when the form is fully created, the real digits are added to 3.14
Steps to reproduce:
The attached demo contains a TFloatSpinEditEx loaded with the value of pi.
The form contains also a TSpinEditEx which is used to change the number of DecimalPlaces of the FloatSpinEditEx, as well as a TButton.
1st test:
The OnCreate event of the form sets its value to pi -> when the form is completely created and shown the string "3.14" is displayed. When the DecimalPlaces are incremented the string becomes "3.140", "3.1400" etc.
2nd test:
Click on the button which sets pi to the FloatSpinEditEx.Value, too, but, of course, only when the form is fully created. Incrementing the DecimalPlaces now addes the correct digits to the "3.14" ("3.142", "3.1416", etc).
Mantis conversion info:
- Mantis ID: 34370
- Fixed in version: 2.0.1 (SVN)
- Fixed in revision: r59332 (#5a23656f)
- Target version: 2.0.1 (SVN)
- LazTarget: 2.0