[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'DB' (#fcl)

TDataSet.EnableControls

Enable event propagation of controls

Declaration

Source position: db.pas line 1683

public procedure TDataSet.EnableControls;

Description

EnableControls tells the dataset to resume sending data-related events to the controls. This must be used after a call to TDataset.DisableControls to re-enable updating of controls.

Note that for each call to DisableControls, a matching call to EnableControls must be made: an internal count is kept and only when the count reaches zero, the controls are again notified of changes to the dataset. It is therefore essential that the call to EnableControls is put in a Finally block:

MyDataset.DisableControls;
Try
  // Do some intensive stuff
Finally
  MyDataset.EnableControls
end;  

Errors

Failure to call enablecontrols will prevent the controls from receiving updates. The state can be checked with TDataset.ControlsDisabled.

See also

TDataset.DisableControls

  

Disable event propagation of controls

TDataset.ControlsDisabled

  

Check whether the controls are disabled


Documentation generated on: Jun 23 2021