enabled

Type: Boolean

Availability: Read or write at any time

The enabled property of the Window class specifies whether the form, control, or menu can respond to user-generated events. It can also result in the physical appearance of a control being changed; for example, grayed (disabled). The enabled property settings are listed in the following table.

Value Description
true Enables the object to respond to events (the default).
false Prevents the object from responding to events. For controls on Web pages, the object is not displayed.

This property allows forms and controls to be enabled or disabled at run time.

If a disabled cell, row, or column has a specified value of the foreColor property, the text in a disabled cell is displayed using that color. The text in a disabled cell is displayed using the Windows disabled text color if the foreColor property of the cell is not specifically set using the foreColor property values of the cell, row, or column.

Unlike the disableEvents property, disabling a control can result in the appearance of the control changing. For example, the text of a Button control is dimmed when the button is disabled. If the control with the focus (or its parent control) is disabled, the focus is moved to the next visible and enabled control in the tab order.

The code fragment in the following example shows the use of the enabled property.

if listFaults.itemText[listFaults.listIndex] <> "" then
    bCloseFault.enabled := true;
endif;