Xbasic
OBJECT.ACTIVATE Function
Syntax
.Activate([C flags])
Arguments
- flags
Character
Description
Sets focus to the object, optional flags 'E' - activate and edit cell in browse, 'A' - additive activate in design mode.
Discussion
The <OBJECT>.ACTIVATE() method applies to:
- Control Panel (for <OBJECT> use the keyword "CONTROLPANEL")
- Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
- Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)
- Form Controls (for <OBJECT> use the <CONTROL> pointer or the address of the control)
The <OBJECT>.ACTIVATE() method sets focus to the object.
Example
To set focus to the Address field on the Sales form:
:Sales:Address.activate()
To set focus to the Sales form:
:Sales.activate()
This code attached to the OnPush event of a button on a form sets focus to the Address field:
parentform:Address.activate()
Limitations
Desktop applications only.
See Also