1. Yiannis Papadomichelakis
  2. PowerBuilder
  3. Thursday, 20 June 2019 14:54 PM UTC

Currently, each column of a datawindow “remembers” the selected keyboard language, when the user entered data. This means that when the user goes from one field to another (using mouse or tab) the keyboard language changes automatically.

This is very – very annoying for our users, is there a way to disable this?

 

Accepted Answer
Andreas Mykonios Accepted Answer Pending Moderation
  1. Thursday, 20 June 2019 17:31 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Ioannis.

If you are using SAP PB 12.6 SP00 PL07 or a later version, then you can add the following to a file named pb.in which should reside in your application path and shall be deployed with your applicationi:

[Data Window]
ForgetColumnKeyboardLayout=yes

This makes the datawindow to maintain the last selected language.

If you are using a version of PB greater than pb 10 ebf 9597 and lower than SAP PB 12.6 SP00 PL07 then you have to use the following win32 functions:

Function long GetKeyboardLayout  (long IdThread) Library "user32.dll"
Function long ActivateKeyboardLayout (long HKL, long flags) Library "user32.dll"

It's up to you to make your application remember the previously used keyboard layout.

Andreas.

Comment
  1. Andreas Mykonios
  2. Thursday, 20 June 2019 17:37 PM UTC
Also I will add that this is documented in SAP's KBA 2230366.
  1. Helpful
  1. Andreas Mykonios
  2. Thursday, 20 June 2019 17:38 PM UTC
PL07 is minor release 4088.
  1. Helpful
There are no comments made yet.
Yiannis Papadomichelakis Accepted Answer Pending Moderation
  1. Friday, 21 June 2019 07:22 AM UTC
  2. PowerBuilder
  3. # 1

Thank you Andreas!

May I ask if there is something similar for the rest of the window controls? Because this behavior also applies to single line edit for example...

 

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 21 June 2019 11:00 AM UTC
  2. PowerBuilder
  3. # 2

The functions I provided should help you to solve that issue in other controls.

Also check your settings in Control Panel\Clock, Language, and Region\Language\Advanced settings. Especially those in the middle of the screen.

Andreas.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 21 June 2019 11:13 AM UTC
  2. PowerBuilder
  3. # 3

If I wanted to make a control remember the last used language I would read the currently used keyboard layout with GetKeyboardLayout function during losefocus.

I would had an inherited object of that sle_control with an instance variable for the keyboard layout.

On getfocus, I would use ActivateKeyboardLayout to set the layout to my instance variable. After that I would change all my sle controls to my inherited one (very easy to do).

But this requires that the OP thought about this "issue" from the beginning. If this isn't the case, then this logic should be applied in any used object, so if you have 10 sle controls, you will have to do some coding for all of them. But if I had to use a window in powerbuilder with 10 sle controls, then I should prefer to use a datawindow (external freeform object). This would give a complete solution to the problem, as in datawindows that issue is now parametrized. Also do not forget all the advantages that a datawindow gives. Example: Zooming without any coding!

Andreas.

 

Comment
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.