ImageEn, unit iexMetaHelpers

TIEMetaListView.OnEditMetaData

TIEMetaListView.OnEditMetaData


Declaration

property OnEditMetaData: TIEEditMetaEvent;


Description

Occurs when the user attempts to edit a meta-data item in the control.
Modify Value to change the text that is offered to the user/saved to params.
Set AllowEdit to False to prevent editing 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:
 You must use EditableTypes to enable field editing.
 After the user finishes editing the OnSaveMetaData event will occur
 The OnAfterEditMetaData event will occur after saving of any editing occurs


Examples

procedure TMainForm.IEMetaListView1EditMetaData(Sender: TObject; MetaType:
    TIEMetaType; RecIndex, DataIndex: Integer; var Value: string; var
    AllowEdit: Boolean);
begin
  // Only allow editing of EXIF "User Comment" and "Description" fields
  AllowEdit := ( MetaType = iemEXIF ) and ( DataIndex in [ _EXIF_UserComment, _EXIF_ImageDescription ]);
end;

procedure TMainForm.IEMetaListView1EditMetaData(Sender: TObject; MetaType:
    TIEMetaType; RecIndex, DataIndex: Integer; var Value: string; var
    AllowEdit: Boolean);
begin
  // Fix casing when editing values
  Value := TitleCase( Value );
end;