ImageEn, unit iemview

TImageEnMView.ThumbnailOptionsEx

TImageEnMView.ThumbnailOptionsEx


Declaration

property ThumbnailOptionsEx: TIEMThumbnailOptionsEx;


Description

Controls some advanced options for the display of icons and thumbnails.
Value Description
ietxCenterThumbnailColumn If enabled and there is more than one row of thumbnails (i.e. GridWidth <> 0) then the thumbnails will be centered horizontally in the view (but not vertically centered) and the horizontal spacing will be padded to lessen the excess spacing on the sides.
If enabled and only one row is displayed (i.e. GridWidth = 0) then the thumbnails will be centered vertically in the view (but not horizontally centered).
When not enabled, the top-left thumbnail will always be at a distance of HorizBorder x VertBorder from the corner
ietxCenterSingleFrame If enabled and DisplayMode is mdSingle, then the frame is centered in the view (vertically and horizontally)
ietxShowIconForUnknownFormat If enabled, then for any ImageFileName of an unknown format ImageEn will load the default icon for that file type (retrieved from Windows using the ShGetFileInfo Shell API function). Otherwise a question mark is displayed.
Note: Don't disable this option if you are showing folders
ietxShowIconWhileLoading If enabled, then the default icon for each file type is displayed while the content is loaded (retrieved from Windows using the ShGetFileInfo Shell API function). Otherwise a blank thumbnail is displayed
ietxShowShadowForIcons If SoftShadow is enabled, then this option determines whether the shadow is displayed for file icons
ietxShowShadowForFolders If SoftShadow is enabled, then this option determines whether the shadow is displayed for folder icons
ietxEnableInternalIcons If ietxShowIconWhileLoading is not specified, then while loading either a blank or internal icon will be displayed (can be set with DefaultFileIcon). Also, when specified an internal icon is shown for files that cannot be found(can be set with MissingFileIcon)
ietxStretchSmallImages If specified, images smaller than the thumbnail cell will be stretched (resampled) to the size of other thumbnail images. If not specified, small images shown at 100% size
ietxOnlyShowIcons Disables image thumbnails and only shows file icons (even for supported image types)
ietxFillWithImgBackground If enabled, the background color of the thumbnail will be filled with that of the image. Otherwise it is set to ThumbnailsBackground
ietxDrawTextFullWidth If enabled, and a solid background has been specified for the text, the background color will fill the width of the thumbnail (otherwise the background color is only as wide as the text)
ietxAutoPadThumbnailColumns If enabled and there is more than one column of thumbnails then the horizontal spacing between columns will be padded to lessen the excess spacing on the side(s)
ietxShowPreviewWhileDragging If enabled, then when dragging or dropping files a preview (icon or image) of the file is shown (TImageEnFolderMView only)
ietxShowInsertPointWhileDragging If enabled, when dragging to the control the insertion point for the new files is displayed as a line between thumbnails (TImageEnMView only). The color is specified by HighlightColor

Default: [ietxShowIconForUnknownFormat, ietxShowIconWhileLoading, ietxEnableInternalIcons, ietxStretchSmallImages, ietxAutoPadThumbnailColumns, ietxCenterSingleFrame, ietxShowPreviewWhileDragging];

Note: You will need to update the display after changing ThumbnailOptionsEx, e.g. by calling ImageEnMView1.Update;


Examples

// Use icons for unknown files
ImageEnMView1.ThumbnailOptionsEx := ImageEnMView1.ThumbnailOptionsEx + [ietxShowIconForUnknownFormat];

// Display all files (not only image files)
ImageEnMView1.FillFromDirectory('C:\', -1, true);


// Do not show shadows for any icon types
ImageEnMView1.ThumbnailOptionsEx := ImageEnMView1.ThumbnailOptionsEx - [ietxShowShadowForIcons, ietxShowShadowForFolders];

// Redraw the display
ImageEnMView1.Update();


// Create a single column of centered thumbnails
ImageEnMView1.GridWidth := 1;
ImageEnMView1.ThumbnailOptionsEx := ImageEnMView1.ThumbnailOptionsEx + [ietxCenterThumbnailColumn];
ImageEnMView1.Update();


// Show file list with icons
ImageEnMView1.ThumbnailOptionsEx := ImageEnMView1.ThumbnailOptionsEx + [ ietxOnlyShowIcons ];


// Give Thumbnail text a solid yellow background to the width of the thumbnail
ImageEnMView1.TextBackgroundStyle := bsSolid;
ImageEnMView1.TextBackgroundColor := clYellow;
ImageEnMView1.ThumbnailOptionsEx  := ImageEnMView1.ThumbnailOptionsEx + [ietxDrawTextFullWidth];


// Show where dragged image will be inserted
ImageEnMView1.ThumbnailOptionsEx := ImageEnMView1.ThumbnailOptionsEx + [ ietxShowInsertPointWhileDragging ];
ImageEnMView1.HighlightColor := clGray;