[fpc-devel] ThousandSeparator

Sven Barth pascaldragon at googlemail.com
Fri Nov 28 08:15:54 CET 2014

Am 28.11.2014 05:01 schrieb "Hans-Peter Diettrich" <DrDiettrich1 at aol.com>:
> Sven Barth schrieb:
>> At my old company our Delphi application handled runtime changes to
these settings rather well. For display the normal XToY (e.g. DateToStr)
functions are used which use the DefaultFormatSettings which are updated
automatically (the VCL's message loop triggers a repaint when format
settings were changed in the system).
> A repaint by itself doesn't change the strings. How do the new strings
come into all the edit boxes, of all open forms?

Of course it's not a mere simple repaint. Controls like TSpinEdit and
TDateEdit (both controls are designed to display localized values) will
convert their internal data value to a string using the current format
settings upon a repaint. If you have a mere edit then you need to handle
that yourself of course by also intercepting the settings change message.
Then you can convert your internal data value (I don't know about you, but
I store my values internally localization independent) to the correct
display value.

> Similarly, when the user changes the system language, can he expect that
every running application updates itself, with changed menus etc., up to
eventually open help viewers? What if the program is not prepared for a
different language, because e.g. a tax assistant is bound to a specific

Of course not every application does or even can handle this. Nevertheless
an OS like Windows provides the possibility for an application to handle
that situation to provide a more seamless experience for its users.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20141128/02e48cf1/attachment.html>

More information about the fpc-devel mailing list