Language Reference Guide : System Classes : InputEvent Class : ActivateFields Method
 
Share this page          
ActivateFields Method
The ActivateFields method makes the specified fields responsive to input events.
To be responsive, fields need a BgBitmap and have an active BgDisplayPolicy such as BDP_BORDEREDTILED, BDP_BORDEREDSCALED, or BDPCORNERED. The method provides a placeholder BgBitmap if the field does not have one and sets the BgDisplayPolicy to BDP_CORNERED if its current setting is not an active one.
The activation can be reversed by invoking the method with the operation parameter set to "disable."
This method has the following syntax:
integer = InputEvent.ActivateFields(fields = array of FormField[, bitmap = BitmapObject]
          [, operation = varchar(32)][, usereventactions = varchar(256)])
This method has the following parameters:
fields
(Required) Specifies the array of fields that are to be enabled or disabled. The simplest way to build this array is using the composite field FieldsByProperty Method.
bitmap
Specifies the placeholder bitmap object to which the BgBitmap of fields having no current BgBitmap are set. All fields reference the same bitmap object, not individual copies. Fields that already have a BgBitmap are not changed.
If a value for this parameter is not provided, the method creates a bitmap object (4px by 4px) whose appearance, if displayed with an active BgDisplayPolicy, automatically matches the field's BgColor, whatever that is.
operation
Specifies the change to be made. Allowed values are:
enable
Specifies that the fields are activated. The previous state is recorded. Any subsequent disable operation restores the fields' previous settings.
enable norecord
Specifies that the fields are activated. The previous state is not recorded. Any subsequent disable operation sets each field's BgBitmap to null and BgDisplayPolicy to BDP_DEFAULT.
disable
Specifies that the fields are inactivated. If the previous state was recorded, it is restored; if it was not recorded, each field's BgBitmap is set to null and BgDisplayPolicy to BDP_DEFAULT.
usereventactions
Lists the inputevents as constant names which, when triggered, send a UserEvent. Each InputEvent name in the comma-separated list is translated to its equivalent integer. Each integer is stored as an ItemKey entry in the "inputevent_enabled" TaggedValue that ActiveFields creates. This facilitates fast lookup by subsequent BdpEvent() calls.