KB-57096: Removing/Alternating focus from a SetPoint.

Question:

Which command must be used to remove focus from a SetPoint after the value has been inserted and Enter key has been pressed? Can focus switch between SetPoints after Enter screen has been pressed?

Solution:

To remove focus from a SetPoint after Enter key has been pressed, you must create a script in the OnKeyPressReturn event (this event will be created in OnKeyPress event) from the screen where the SetPoint is.

In this event’s script, use SetFocus method to pass focus to another object on the screen.

Sample script:

Button1.SetFocus().

To alternate focus between SetPoints, press Enter and create a new script at the Screen’s OnShow event, setting the main focus to the desired SetPoint.

Sample script:

Setpoint1.SetFocus()

At the screen’s OnKeyPressReturn event, add the script below:

Sample script:

IF Setpoint1.HasFocus()
Setpoint2.SetFocus()
ELSEIF Setpoint2.HasFocus()
Setpoint3.SetFocus()
ELSEIF Setpoint3.HasFocus()
Setpoint1.SetFocus()
ENDIF

 

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *