ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
Jam.Shell.Types.IItemIdList.SetPropertyValue

Sets metadata of a file using the property system of Windows.

Syntax
Pascal
procedure SetPropertyValue(const pKey: TShellColumnId; const pValue: TShellPropertyValue);
Parameters 
Description 
const pKey: TShellColumnId 
The ShellColumnId of the metadata that should be changed. 
const pValue: TShellPropertyValue 
The new value for this mestadata. 

To set the vlaue of a shell property use code like this:

function UpdateShellProperties();
var
  lItemIdList: IItemIdList;
begin
  // Create an ItemIDList from a path
  lItemIdList := TJamItemIdList.Create('C:\Temp\Picture.jpg');
  // Set the title of the image
  lItemIdList.SetPropertyValue(TShellColumns.Title, 'ShellBrowser Logo');
  // Set the date when the photo was taken to the current date
  lItemIdList.SetPropertyValue(TShellColumns.Photo_DateTaken, Now);
end;