ALLOWFOCUS property (Common)
Description
Specifies if an object can accept input focus.
Property Value
A Boolean value denoting if the object can accept the input focus.
Property Traits
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
Get | Get | No | No | No |
Remarks
In the majority of cases this property is Get-only and is controlled by the Presentation Server. For example, STATIC controls can never accept the input focus and this property always returns FALSE$, while other controls, such as the TABCONTROL and the WINCONTROL, do allow this property to be set at design time, thereby allowing the developer more fine-grained control of their behavior. These cases are noted in the documentation for the object type.
Note that this property is not dependent on the ENABLED property, which can also stop an object receiving the input focus. An object that is disabled can still return TRUE$ from its ALLOWFOCUS property, as the ENABLED state is considered to be "temporary" and a property of the object instance, rather than its type.
Example
* // Assume the STB_STATUS object is actually a WINCONTROL * // object, and we wish to see if we can give it the focus * // before we try and move it there If Get_Property( @Window : ".STB_STATUS", "ALLOWFOCUS" ) Then Call Set_Property( "SYSTEM", "FOCUS", @Window : ".STB_STATUS" ) End
See Also
N/A