The OpenD Programming Language

Widget.enabled

Determines whether the control is marked enabled. Disabled controls are generally displayed as greyed out and clicking on them does nothing. It is also possible for a control to be disabled because its parent is disabled, in which case this will still return true, but setting enabled = true may have no effect. Check disabledBy to see which parent caused it to be disabled.

I also recommend you set a disabledReason if you chose to set enabled = false to tell the user why the control does not work and what they can do to enable it.

  1. bool enabled [@property getter]
    class Widget
    @property
    bool
    enabled
    ()
  2. bool enabled [@property setter]

Bugs

Currently only implemented for widgets backed by native Windows controls.

See Also

Meta

History

Added November 23, 2021 (dub v10.4)

Warning: the specific behavior of disabling with parents may change in the future.