1) Placeholder, if set, will use the hint of the edit control.
2) RegionalSettings is a public property of the ServerController and the Session. Each session inherits the same settings of the ServerController.RegionalSettings property, but can be configured independently.
By default, RegionalSettings is initialized using the same values for its sub-properties (e.g. decimal separator, thousands separator, etc.) as the Delphi standard FormatSettings.
Example of using a global (set at ServerController level) RegionalSettings. The same will apply to all sessions.
procedure TIWServerController.IWServerControllerBaseConfig(Sender: TObject);
begin
RegionalSettings.DecimalSeparator := ',';
RegionalSettings.ThousandSeparator := '.';
RegionalSettings.CurrencyString := 'NZD';
RegionalSettings.CurrencyFormat := 2; // currency symbol + a space are placed on the left side of the number.
RegionalSettings.ShowThousandSeparator := True;
end;
BTW, this is only valid when DataTypeOptions.NumberValidation = nvIntraWeb. When the value is nvBrowserNative, the browser will always use the local settings of the machine where the browser is.
thanks for your reply. However, it doesn't work. According to your information:
procedure TTstServer.IWServerControllerBaseConfig(Sender: TObject);
begin
RegionalSettings.DecimalSeparator := ',';
RegionalSettings.ThousandSeparator := '.';
RegionalSettings.CurrencyString := 'NZD';
RegionalSettings.CurrencyFormat := 2; // currency symbol + a space are placed on the left side of the number.
RegionalSettings.ShowThousandSeparator := True;
end;
(04-27-2022, 06:01 AM)Alexandre Machado Wrote: It does work for me as I mentioned.
The first edit is a float with 2 dp and the second is set to currency. Both work as expected.
Hi Alexandre,
unfortunately I have the same problem reported by Detlef.
Clicking the comma doesn't have any effect even in your new test project.
If I try "123456" "comma" "99" the output is "12.345.699.00" and "NZD 12.345.699,00"
If I try "123456" "dot" "99" the output is "123.456.99" and "NZD 123.456.99,00"
And if you click on the field several times (or tab through the fields) a "00" is added to the output at every click.
04-27-2022, 10:33 PM (This post was last modified: 04-27-2022, 10:39 PM by Alexandre Machado.)
(04-27-2022, 09:44 AM)Fabrizio Conti Wrote:
(04-27-2022, 06:01 AM)Alexandre Machado Wrote: It does work for me as I mentioned.
The first edit is a float with 2 dp and the second is set to currency. Both work as expected.
Hi Alexandre,
unfortunately I have the same problem reported by Detlef.
Clicking the comma doesn't have any effect even in your new test project.
If I try "123456" "comma" "99" the output is "12.345.699.00" and "NZD 12.345.699,00"
If I try "123456" "dot" "99" the output is "123.456.99" and "NZD 123.456.99,00"
And if you click on the field several times (or tab through the fields) a "00" is added to the output at every click.
Thanks
Fabrizio
I did the same here and both worked as expected.
See attached image for the first case.
Regarding the second case, typing "123456" "dot" "99" will indeed produce "NZD 123.456.99,00" because the dot is ignored
Can you please tell me your IW version, the browser that you are using and the local regional settings of your client machine (the one where the browser is installed)?