Disabling Controls

FUNCTIONS

  void  enable(control c);	/* enable for user interaction */
  void  disable(control c);	/* prevent user from using it */
  int   isenabled(control c);	/* is this control enabled? */

NOTES

A control can be enabled so it can receive user input and mouse clicks, or disabled so that it cannot.

To enable a control to receive user input and mouse clicks, call the enable function. By default, when a control is created, it is always enabled. However, this function can re-enable a control which has been disabled.

To disable a control, and make it ignore user input, use disable. A disabled control will usually have grey text, and will not respond to the user. An exception to this is a disabled textbox or field, which will appear normal, but cannot be edited or modified by the user.

The isenabled function will return zero if the control is disabled, and non-zero if it is enabled.