TDBImage.UpdateData procedure
Performs actions needed to validate and store the content for the image control.
Declaration
procedure UpdateData(Sender: TObject); virtualArguments
Sender | Object for the event notification. |
Description
UpdateData is a procedure used to validate and store the content for the image control.
UpdateData examines the Picture in the image control to ensure that it has been assigned, and contains image content. The Field in the linked dataset is cleared if either condition is False, and no additional actions are performed in the method.
Otherwise, a BLOB stream is created and used to write the image content to the field in the linked dataset. The OnDBImageWrite event handler is signalled (when assigned) to write a custom image header to the BLOB stream. If OnDBImageWrite is not used, and WriteHeader is True, the file extension for the graphic format is written to the BLOB stream. Finally, the content for the bitmap graphic is written to the BLOB stream.
UpdateData is assigned as the OnUpdateData event handler in the internal TFieldDataLink instance used in the control.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
