ImageEn, unit iemview

TImageEnMView.ImageTopText

TImageEnMView.ImageTopText


Declaration


property ImageTopText[idx: Integer]: WideString;


Description


Use ImageTopText to specify custom text to appear above the thumbnail of index, idx.
The default top text is specified by DefaultTopText but you can override this for a specific thumbnail by setting a value for ImageTopText.

Notes:
- The font style is set by TopTextFont. But you can customize it for specific thumbnails using the OnGetTextEx event.
- UpperGap will be adjusted to fit the text.
- Other text fields that can be set are: ImageBottomText and ImageInfoText
- If AutoAdjustStyle = True, then setting Style will automatically set ImageTopText

You can optionally specify the following constants:
Value Displays Example
IEM_Filename Name of the file 'MyImage.jpg'
IEM_FilenameNoExt Name of the file without its extension (or path) 'MyImage'
IEM_FilePath Path of the file 'C:\Data\My Pictures\'
IEM_ImageDimensions Dimensions and color depth of images (Nothing is shown for non-images) '1200 x 800'
IEM_ImageDimAndSize Dimensions of images with the file size '1200 x 800, 3,900 KB'
IEM_FileSize Size of the file on disk '3,900 KB'
IEM_FileCreateDate The date that the file was created '7/5/13'
IEM_FileCreateDateTime The date and time that the file was created '7/5/13 8:03am'
IEM_FileCreateDateAndSize The create date of the file and its size '7/5/13, 3,900 KB'
IEM_FileEditDate The date that the file was last edited '7/5/13'
IEM_FileEditDateTime The date and time that the file was last edited '7/5/13 8:03am'
IEM_FileEditDateAndSize The last edit date of the file and its size '7/5/13, 3,900 KB'
IEM_FileType The ImageEn type for this file 'JPEG Image'
IEM_FileExt The extension only of the file, e.g. JPEG for 'MyImage.jpeg' 'JPEG'
IEM_ImageDict"xyz" Returns the value of key xyz from the ImageDictionary 'Some Dictionary Value'



Example


ImageEnMView1.ImageTopText[idx] := 'Top text';
ImageEnMView1.ImageInfoText[idx] := 'Info text';
ImageEnMView1.ImageBottomText[idx] := 'Bottom text';



// Display the filename and dimensions for each image
for I := 0 to ImageEnMView1.ImageCount - 1 do
begin
  ImageInfoText[I] := IEM_ImageDimensions;
  ImageBottomText[I] := IEM_Filename;
end;


Compatibility Notes


Prior to v6.0.0, ImageTopText was a class that held properties for Font, Caption, etc. This was simplified in v6.0.0. ImageTopText is now only a widestring that carries the caption for a cell.

So code that was previously:
ImageTopText[idx].Caption := 'Abc';

Is now:
ImageTopText[idx] := 'Abc';

To set the font of the text, use TopTextFont. TextBackgroundStyle and TextBackgroundColor now control the background for all cells, and TextTruncSide allows you to change the truncation. These properties affect all cells, so to customize the styling of a particular cell use the OnGetTextEx event.


See Also


- OnGetText