WA SET PREFERENCE
WA SET PREFERENCE ( {* ;} object ; selector ; value )
Parameter | Type | Description | |
---|---|---|---|
* | Operator | → | If specified, object is an object name (string) If omitted, object is a variable |
object | any | → | Object name (if * is specified) or Variable (if * is omitted) |
selector | Integer | → | Preference to be modified |
value | Boolean | → | Value of the preference (True = allowed, False = not allowed) |
Description
The WA SET PREFERENCE command sets different preferences for the Web area designated by the * and object parameters.
Pass the preference to be modified in the selector parameter and the value to be assigned to it in the value parameter. In selector, you can pass one of the following constants, found in the Web Area theme:
Constant | Value | Comment |
---|---|---|
WA enable contextual menu | 4 | Allow the display of a standard contextual menu in the Web area. Default (any engine) = False |
WA enable URL drop | 101 | Change drop icon and call On Window Opening Denied event when URLs or files are dropped in the Web area. Default (any engine) = False |
WA enable Web inspector | 100 | Allow the display of the Web inspector in the area. Default (any engine) = False |
For each preference, pass True in value to activate it and False to deactivate it.
Example
To enable URL drops in the 'myarea' Web area:
//in the form method
WA SET PREFERENCE(*;"myarea";WA enable URL drop;True)
//in web area object method
If(FORM Event.code=On Window Opening Denied)
WA OPEN URL(*;"myarea";WA Get last filtered URL(*;"WebArea"))
End if
See also
Properties
Command number | 1041 |
Thread safe | ✗ |