ImageEn, unit iexMetaHelpers

TIEMetaListView.OnAddMetaData

TIEMetaListView.OnAddMetaData


Declaration

property OnAddMetaData: TIEAddMetaEvent;


Description

Occurs each time a meta-data item is added to the control.
The Caption and value can be edited. Set Include to False to skip addition of the item.

RecIndex is only used by iemIPTC and iemDICOM, for other values it will be 0.

For DataIndex:
Value Description
iemGeneral General Tag Constants
iemEXIF Constants for EXIF Properties
iemIPTC PhotoShop IPTC Constants
iemDicom Dicom Tags Supported by ImageEn
iemXMP Constants for Common XMP Fields
iemPDF Constants for PDF Properties

Note: OnAddMetaData will only occur for field types enabled by AutoShowTypes or AlwaysShowTypes


Examples

procedure TMainForm.IEMetaListView1AddMetaData(Sender: TObject; MetaType:
    TIEMetaType; RecIndex, DataIndex: Integer; var Caption, Value: string;
    var Include: Boolean);
begin
  // Skip secondary EXIF date fields
  if ( MetaType = iemEXIF ) and
     (( DataIndex = _EXIF_DateTimeOriginal ) or ( DataIndex = _EXIF_DateTimeDigitized )) then
    Include := False;
end;

procedure TMainForm.IEMetaListView1AddMetaData(Sender: TObject; MetaType:
    TIEMetaType; RecIndex, DataIndex: Integer; var Caption, Value: string;
    var Include: Boolean);
begin
  // Skip EXIF fields without values
  if ( MetaType = iemEXIF ) and ( Value = '' ) then
    Include := False;
end;

procedure TMainForm.IEMetaListView1AddMetaData(Sender: TObject; MetaType:
    TIEMetaType; RecIndex, DataIndex: Integer; var Caption, Value: string;
    var Include: Boolean);
begin
  // Add an asterisk to any fields that can be edited
  if MetaType in IEMetaListView1.EditableTypes then
    Caption := Caption + '*';
end;