ShellBrowser Delphi Components Documentation
|
The event that is fired when a Thumbnail was updated.
TOnThumbnailUpdated = procedure (sender: TObject; item: TListItem; var ThumbnailBitmap: TBitmap) of object;
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;