ImageEn, unit iemview

TImageEnMView.OnGetText

TImageEnMView.OnGetText


Declaration

property OnGetText: TIEGetTextEvent;


Description

Occurs before text is output when drawing a thumbnail allowing you to insert or modify the displayed text.

Notes:
- If Style is iemsColumns then OnGetText is also called for the header row. The Index will be -1.
- If default text has not been specified for any thumbnails, you may need to set UpperGap/BottomGap to allow space for the text
- You can also use OnGetTextEx to customize text as well as font styling


Example

// Note: In form create we set IEFolderMView.UpperGap := 20; or IEFolderMView.DefaultTopText := iedtCustom;

// Display the file index above the frame
procedure TForm1.IEFolderMViewGetText(Sender: TObject; Index: Integer; Position: TIEMTextPos; var Text: WideString);
begin
  if Index = -1 then
    Text := 'File Number' // Header row
  else
  if Position = iemtpTop then
    Text := 'File #' + IntToStr(Index + 1);
end;