| Directives |
|
| Formats | 1. Set Focus On: SET_FOCUS ctl_id 2. Retry: SET_FOCUS RETRY ctl_id 3. Read CTL Value: SET_FOCUS READ ctl_id Where: |
|
| ctl_id | Unique control ID of the custom control (BUTTON, LIST_BOX, DROP_BOX, etc.) to which to direct subsequent input. Numeric expression. | |
| Description | Use the SET_FOCUS directive to set the focus on the custom control you want to receive the next user input. ProvideX returns Error #65: Window element does not exist or already exists if you use SET_FOCUS for a non-existent or disabled control item. | |
| Format 1 | Set Focus On SET_FOCUS ctl_id Setting the focus to a control directs subsequent terminal input to it, unless the user overrides it with the mouse. If the value of the ctl_id is zero, input is directed to the screen INPUT directives. Example: 1000 BUTTON 100,@(10,10,10,2)="Write" 1010 BUTTON 101,@(15,10,10,2)="Delete" 1030 SET_FOCUS 100 The next keyboard input will be directed to the Write button. |
|
| Format 2 | Retry SET_FOCUS RETRY ctl_id Use the SET_FOCUS RETRY format to set an internal "modified" flag on the control. If the user attempts to Tab away from the control, it will retry its associated CTL event. You can use this in input validation (i.e., when an application detects invalid input). You can issue a SET_FOCUS RETRY directive to have ProvideX reprocess the input field whether the user changes something or attempts to Tab away from it. |
|
| Format 3 | Read CTL Value SET_FOCUS READ ctl_id Use SET_FOCUS READ to obtain the CTL value of the control which currently has focus. The CTL value is 0 (zero) if no control has focus. |
|