DecimalSeparator used by TFloatSpinEdit seems to be "hard coded"
Original Reporter info from Mantis: Bart @flyingsheep
-
Reporter name: Bart Broersma
Original Reporter info from Mantis: Bart @flyingsheep
- Reporter name: Bart Broersma
Description:
The DecimalSeparator that is shown in the TFloatSpinEdit controls seems not to be dependent on either system locale setting or the value of SysUtils.DecimalSeparator.
Steps to reproduce:
Attached sample program demonstrates the problem.
It uses clocale unit to determine (correctly, I checked) the locale value of DecimalSeparator and will display them.
Click the "Period" and "Comma" button to change the value of DecimalSeparator (click "GetValue" bitton to verify that DecimalSeparator is set correctly: it displays current value of the control, formatted using current Decimalseparator).
On My system (Suse 10.0, locale nl_NL.utf8) it behaves as follows:
GTK1
- DecimalSeparator at programstart = "," (#44 (closed))
- ThousandSeparator at programstart = " " (#0)
- Decimalseparator used by the control ","
- Changing value of SysUtils.DecimalSeparator has no visible effect on the control
GTK2
- DecimalSeparator at programstart = "," (#44 (closed))
- ThousandSeparator at programstart = " " (#0)
- Decimalseparator used by the control "."
- Changing value of SysUtils.DecimalSeparator has no visible effect on the control
Note the difference between GTK1 and GTK2.
I could live with the control using locale settings, but now it gets rather confusing for the user, especially if you use other controls that display a DecimalSeparator.
Additional information:
On Win9x the control responds well to changes in DecimalSeparator (after updating the control of course)
I'm not even sure that it is at all possible to set the character used to display the decimalSeparator in the control. I could not find anything in the docs (http://library.gnome.org/devel/gtk/stable/GtkSpinButton.html).
Mantis conversion info:
- Mantis ID: 13349
- OS: Suse Linux
- OS Build: 10.0
- Build: 18956
- Platform: i386
- Version: 0.9.27 (SVN)
- Target version: 1.2.0
- LazTarget: 1.2