PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Principle
  • First method: using SetFocusAndReturnToUserInput or SetFocus
  • Second method: using ScreenFirst
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Principle
Two methods can be used to set focus to a control:
First method: using SetFocusAndReturnToUserInput or SetFocus
SetFocusAndReturnToUserInput (or SetFocus) gives focus to the specified control and it allows you to go back in edit to the window without running the WLanguage code found after the call to the function.
Code example:
IF SAI_CODE = "" THEN
SetFocusAndReturnToUserInput(SAI_CODE)
// Code non exécuté
ELSE
SetFocusAndReturnToUserInput(SAI_INTITULE)
// Code non exécuté
END
// Code non exécuté
Second method: using ScreenFirst
ScreenFirst is used to store the control that will gain focus. The WLanguage code that follows the call to the function continues to run. This allows you to change the control on which you want to be positioned before going back in edit to the window.
Code example:
// En fonction des retours des traitements 1 et 2
// on se positionne à la fin du traitement sur le champ SAI_QTE ou SAI_CODEREMISE
 
// Exécution traitement partie 1
...
IF nResPartie1 = 0 THEN ScreenFirst(SAI_QTE)
...
// Exécution traitement partie 2
...
IF bResPartie2 = False THEN ScreenFirst(SAI_CODEREMISE)
...
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment