ImageEn, unit iexMetaHelpers |
|
TIEMetaListView.OnSaveMetaData
Declaration
property OnSaveMetaData: TIEEditMetaEvent;
Description
Occurs after the user finishes editing a meta-data item and attempts to save it
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:
Note:
◼You must use
EditableTypes to enable field editing.
◼You can prevent editing of a field using the
OnSaveMetaData event
◼The
OnAfterEditMetaData event will occur after saving of any editing occurs
procedure TMainForm.IEMetaListView1SaveMetaData(Sender: TObject; MetaType:
TIEMetaType; RecIndex, DataIndex: Integer; var Value: string; var
AllowEdit: Boolean);
begin
// Require a value to be specified for the EXIF "Description" field
if ( MetaType = iemEXIF ) and ( DataIndex = _EXIF_ImageDescription ) and ( Value = '' ) then
begin
MessageDlg( 'You must specify a value for the EXIF Description', mtError, [ mbOK ], 0 );
AllowEdit := False;
end;
end;
procedure TMainForm.IEMetaListView1SaveMetaData(Sender: TObject; MetaType:
TIEMetaType; RecIndex, DataIndex: Integer; var Value: string; var
AllowEdit: Boolean);
begin
// If the user has specified all lower case text, then convert it to title case
if Value = Lowercase( Value ) then
Value := Titlecase( Value );
end;