Xbasic
OBJECT.ENABLE Function
Syntax
.Enable()
Description
Allows the form, field, button, checkbox, etc, to receive focus.
Discussion
The <OBJECT>.ENABLE() method applies to:
- Alpha Anywhere (for <OBJECT> use the keyword "A5")
- 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>.ENABLE() method makes a form able to receive focus. The method also works with fields, buttons, check boxes, etc.
The following script on the OnDepart event for the PayMethod field on a form enables the CreditCard field if the payment method is "Credit Card":
if (PayMethod.value = "Credit Card") then CreditCard.enable() else CreditCard.disable() end if
Limitations
Desktop applications only.
See Also