How to Label the Slides

Problem Is there any way to add the filename to each of the thumbnails below it so that we can identify the image name?
Solution In order to put any text below the thumbnails you should use the event OnSlideRendered. Assuming that the name of the thumbnail component is "TN", the corresponding code to display the slide number below each slide would read as follows:

procedure TForm1.TNSlideRendered (Sender: TObject; Canvas: TCanvas;
                                  X, Y, ThumbID: integer);

Canvas.TextOut (X+8,Y+TN.SlideSize-TN.SlideMargin, IntToStr(ThumbID));

To display the filename, you simply have to take the ThumbID parameter and use it to look up for the filename of the corresponding slide.


Last Update: 2012-11-25