1. Song Tom
  2. PowerBuilder
  3. Wednesday, 3 January 2024 08:25 AM UTC

Dear Appeon:

 

    We encountered a strange issue these days, seems all of our commandbutton controls in our application can automatically trigger the clicked event, when unintentionally press enter or space on it in case there is a bule rectangle on it. this issue cannot even solved, even when we call setfocus function to switch focus to other controls (because the blue solid rectangle still remains on the previous clicked button), it gets great impact on our application these days when there are more than 10,000 times of scan and key presses these busy days. I have no idea so far, how to deal with it, can give me an idea.  

BTW, our Powerbuilder is 2017R3 build#1880, and OS is Win11 or above?

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 4 January 2024 09:25 AM UTC
  2. PowerBuilder
  3. # 1

Another thing you can do, is create your own "button", using a static text, but of course it might be a lot of work to replace all of your command buttons with that new control.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 3 January 2024 14:49 PM UTC
  2. PowerBuilder
  3. # 2

This behavior is due to having one or more command buttons in the window with the property named "Default" enabled:

The clicked event will still be triggered in a command button when the command button has input focus and the Space bar is pressed, however.

Comment
  1. Song Tom
  2. Wednesday, 3 January 2024 16:34 PM UTC
Thanks John, But actually, we have checked all the command buttons on the User Interface, all the default option has been unchecked
  1. Helpful
  1. John Fauss
  2. Thursday, 4 January 2024 02:26 AM UTC
I tested using using PB 2017 R2 on a Windows 10 machine, and the only conditions where a command button is drawn with a blue "highlighted" rectangular border is when one of the command buttons in the window is Default enabled. Is there any possibility you have a hidden command button that has Default enabled? Have you tested your app on a Windows 10 machine to see if it works differently?

Please recognize that PB 2017 was never certified for use with Windows 11, so there is a possibility this could be a factor.

At any rate, PB 2017 is no longer supported by Appeon, so you run a risk of issues using it under Windows 11.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 3 January 2024 12:20 PM UTC
  2. PowerBuilder
  3. # 3

Hi Song;

  FYI: in order to be W11 compliant you need to be using PB 2022 or higher. Also, PB 2017 is now "out of support".

  The focus behaviour on a CB is standard MS-Windows behaviour. Setting a default for the "enter" key to fire a click event on a CB and also running the click event on a Space Bar press when the CB has focus is also standard O/S behaviour.

Regards ... Chris 

Comment
  1. Song Tom
  2. Wednesday, 3 January 2024 13:44 PM UTC
Thanks Chris, I know that, but how can I remove or move away that blue rectangle, seems setfocus cannot work
  1. Helpful
There are no comments made yet.
Song Tom Accepted Answer Pending Moderation
  1. Wednesday, 3 January 2024 09:29 AM UTC
  2. PowerBuilder
  3. # 4

Actually, I want to know whether there is any way to remove the blue rectangle on a commandbutton after it being clicked 

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 3 January 2024 14:49 PM UTC
Hi Song;

FWIW: The SetFocus() command works OK for me in my Apps but I am using PB 2022 R2 on W11 as only version PB version 2022 & higher is supported on that O/S version. However, I am not privy to your App's design & code - so it could be something else blocking the SetFocus().

Regards .. Chris
  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.