ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
Jam.Shell.Controls.BaseShellListView.TOnThumbnailUpdated

The event that is fired when a Thumbnail was updated.

Syntax
Pascal
TOnThumbnailUpdated = procedure (sender: TObject; item: TListItem; var ThumbnailBitmap: TBitmap) of object;
Parameters 
Description 
sender 
The control where the Thumbnail was updated. 
Item 
The item where the Thumbnail is updated. 
ThumbnailBitmap 
The Thumbnail that will be used. 

To avoid resizing internally, stick to the same dimensions.

You can paint on the passed ThumbnailBitmap's canvas or swap entire thumbnails like illustrated in this example.

 procedure TMainForm.ShellListThumbnailUpdated(sender: TObject; item: TListItem;
   var ThumbnailBitmap: TBitmap);
 var lBitmap: TBitmap;
 begin
   //Create or load a custom bitmap in the correct size.
   lBitmap := GetCustomBitmap(TJamCheckableListItem(item), ThumbnailBitmap.Height, ThumbnailBitmap.Width);
   ThumbnailBitmap.Assign(lBitmap);
   FreeAndNil(lBitmap); //avoid memory leak.
 end;