Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIWEdit - sample with pattern and regional settings
#2
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.
Reply


Messages In This Thread
RE: TIWEdit - sample with pattern and regional settings - by Alexandre Machado - 04-09-2022, 09:56 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)