ImageEn, unit iemview

TIEGetTextEvent


Declaration

type TIEGetTextEvent = procedure(Sender: TObject; Index: integer; Position : TIEMTextPos; var Text: WideString) of object;


Description

Occurs before text is output when drawing a thumbnail allowing you to insert or modify the displayed text (by specifying a new value for Text).

Position Description
iemtpTop Overrides the text specified for ImageTopText
iemtpInfo Overrides the text specified for ImageInfoText
iemtpBottom Overrides the text specified for ImageBottomText

Note:
Ensure that you have set UpperGap/BottomGap to allow space for the text
Setting Text only modifies the text that is displayed, not the value in ImageTopText/ImageInfoText/ImageBottomText


Example

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

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