Skip to content
View in the app

A better way to browse. Learn more.

FGX Native

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SALONA

Members
  • Joined

  • Last visited

  1. SALONA started following Guides
  2. SALONA started following Yaroslav Brovin
  3. unit NumberEdit; interface uses System.SysUtils, System.Classes,System.Character, FGX.Edit,FGX.Text, FGX.Types,FGX.Consts; type [ComponentPlatformsAttribute(fgMobilePlatforms)] TfgEditNumber = class(TfgEdit) private FDecimalSeparator: Char; FThousandSeparator: Char; FCurrencySymbol: string; FAllowDecimal: Boolean; procedure FormatNumber; procedure DoTextChanged(Sender: TObject); function CleanNumber(const S: string): string; public constructor Create(AOwner: TComponent); override; property ThousandSeparator: Char read FThousandSeparator write FThousandSeparator; property DecimalSeparator: Char read FDecimalSeparator write FDecimalSeparator; property CurrencySymbol: string read FCurrencySymbol write FCurrencySymbol; property AllowDecimal: Boolean read FAllowDecimal write FAllowDecimal; end; implementation uses FGX.ClassStorage; { TfgEditNumber } constructor TfgEditNumber.Create(AOwner: TComponent); begin inherited Create(AOwner); Self.OnChanged := DoTextChanged; Self.KeyboardType := TfgKeyboardType.NumbersAndPunctuation; // Default Settings FThousandSeparator := ','; // Default: Comma separator FDecimalSeparator := '.'; // Default: Dot as decimal FCurrencySymbol := ''; // No currency by default FAllowDecimal := True; // Allow decimal numbers end; // Remove Non-Numeric Characters Except Decimal Point function TfgEditNumber.CleanNumber(const S: string): string; var C: Char; DecimalCount: Integer; begin Result := ''; DecimalCount := 0; for C in S do begin if C.IsDigit then Result := Result + C else if (C = FDecimalSeparator) and (FAllowDecimal) and (DecimalCount = 0) then begin Result := Result + C; Inc(DecimalCount); end; end; end; // Format Number with Custom Separators and Currency procedure TfgEditNumber.FormatNumber; var NumStr, FormattedStr: string; Value: Double; DecimalPart: string; begin NumStr := CleanNumber(Self.Text); if NumStr.IsEmpty then Exit; if FAllowDecimal and (Pos(FDecimalSeparator, NumStr) > 0) then begin DecimalPart := Copy(NumStr, Pos(FDecimalSeparator, NumStr), MaxInt); NumStr := Copy(NumStr, 1, Pos(FDecimalSeparator, NumStr) - 1); end else DecimalPart := ''; if TryStrToFloat(NumStr, Value) then FormattedStr := FormatFloat('#' + FThousandSeparator + '##0', Value) else FormattedStr := NumStr; FormattedStr := FCurrencySymbol + FormattedStr + DecimalPart; if Self.Text <> FormattedStr then begin Self.OnChanged := nil; // Prevent recursion Self.Text := FormattedStr; Self.OnChanged := DoTextChanged; end; end; // Handle Text Change Event procedure TfgEditNumber.DoTextChanged(Sender: TObject); begin FormatNumber; end; initialization TfgClassStorage.RegisterClasses([TfgEditNumber]); end. I got this error on this line : LEdit:=TfgEditNumber.Create(Self);

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.