|
|
|
|
|
- Principle
- First method: SetFocusAndReturnToUserInput or SetFocus function
- Second method: ScreenFirst function
How to set focus to a window control?
Two methods can be used to set focus to a control: First method: SetFocusAndReturnToUserInput or SetFocus function 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 sample: IF EDT_CODE = "" THEN
SetFocusAndReturnToUserInput(EDT_CODE)
ELSE
SetFocusAndReturnToUserInput(EDT_HEADING)
END
Second method: ScreenFirst function 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 sample:
...
IF nResPart1 = 0 THEN ScreenFirst(EDT_QTY)
...
...
IF bResPart2 = False THEN ScreenFirst(EDT_DISCOUNTCODE)
...
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|