1. Alain Van den Abbeele
  2. PowerBuilder
  3. Wednesday, 6 November 2019 12:14 PM UTC

There is a weird difference between typing a decimal separator (numeric keypad) in a datawindow versus a single- or multilineedit control.

My international settings are "Dutch (Belgium) - Belgian (point)".

In a datawindow a comma is inserted (which is correct), but in a single- or multilineedit control a period is inserted.

I believe the period is incorrect, as my decimal separator is a comma.

 

Michael Kramer Accepted Answer Pending Moderation
  1. Wednesday, 6 November 2019 12:49 PM UTC
  2. PowerBuilder
  3. # 1

Hi Alain, There is no datatype awareness in the system class = SingleLineEdit. Any decimal separator must be coded somewhere in your app. Potentially in a base class like pfc_u_sle_base, u_sle_base or sle_base. There I guess a decimal point is hardcoded instead of being regional settings aware.

Any call to function = String( my-decimal-var, "#,##0.00") or similar will adhere to your regional settings - unless you found a completely new bug.

HTH /Michael

Comment
  1. Alain Van den Abbeele
  2. Wednesday, 6 November 2019 13:16 PM UTC
Hi Michael, the decimal point on the numeric keypad is regional settings aware by Windows, no additional code is necessary.

This works as expected in a datawindow, but a single- or multilineedit control appears to ignore this.



Have you tried reproducing this?
  1. Helpful
  1. Michael Kramer
  2. Wednesday, 6 November 2019 14:38 PM UTC
I'm in Netherlands so setup very similar to your setup in Belgium.

DataWindow data entry => Decimal separator key on numeric keypad enters the current decimal separator as defined in regional settings. -- Result: Key enters comma.

SingleLineEdit / MultiLineEdit data entry => Data entered as text. Hence, similar to Windows Notepad behavior. -- Result: Key enters point.

You will need to process numeric keypad's decimal separator explicitly to get different behavior.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.