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.
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
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;