Field_SetBooleanProperty()

Examples


The Field_SetBooleanProperty() function sets a specified boolean property for a field.

Syntax

Field_SetBooleanProperty(field_name, property, value)

Parameters

field_name – The name of a window field.

property – An integer constant indicating the property to set. The value corresponds to one of the following constants:

[spacer]

Constant

Description

FIELD_PROP_AUTOCOMPLETE

True if the string field has AutoComplete enabled. False if it does not.

FIELD_PROP_BDL_DROP_INDICATOR

True if the drop indicator for a button drop list is displayed. False if it is not.

FIELD_PROP_CANCEL

True if the field is the Default Cancel for the window. False if it is not.

FIELD_PROP_DEFAULT

True if the field is the Default OK field for the window. False if it is not.

FIELD_PROP_DISABLED

True if the field is disabled. False if it is not.

FIELD_PROP_EDITABLE

True if the field is locked or disable. False otherwise.

FIELD_PROP_FOCUS

True if the field currently contains the focus. False if it does not. This property is independent of whether the window is active or inactive.

FIELD_PROP_HYPERSPACE

True if the field is marked as Hyperspace. False if it is not.

FIELD_PROP_LOCKED

True if the field is locked. False if it is not.

FIELD_PROP_REQUIRED

True if the field is required. False if it is not.

FIELD_PROP_SURROUNDING_BOX

True if the field is drawn with a border. False if it is not.

FIELD_PROP_TAB_STOP

True if the field is in the tab sequence. False if it is not.

FIELD_PROP_VISIBLE

True if the field is visiable. False if it is not.


value – A boolean indicating how to set the property. Refer to the preceding table.

Return value

A boolean indicating whether the property was set. True indicates the property was set, while false indicates it was not.

Comments

Use the Field_GetBooleanProperty() and Field_SetBooleanProperty() functions to dynamically control which fields in a window are the Default OK and Default Cancel.

Be aware that the required() function will not consider disabled fields required, even though they have the FIELD_PROP_REQUIRED property set to true.


Documentation Feedback