ThumbView questions lazarus / 39-Graphics ---------------------------------------------------------------------- sniperton · 2011-06-14 14:59 Background: I’m a hobby-programmer developing a database application in which records can contain image-references as well. I use ThumbView to display referenced images by passing their URLs to the control’s URLList property. When the user selects a thumbnail, the corresponding image is displayed in large in a Timage control. At the same time the user should be allowed to modify the list of referenced images, so this way ThumbView should serve as a WYSIWYG interface to manipulate the actual record. Here are my questions: 1. On my 32-bit Win7, ThumbView crashes each time a filename contains special characters like “á” or “é”. I pass filenames as a simple string to a TImage (which doesn’t crash) and to a ThumbView (which crashes with an “exception class ‘FPImageException’ with message: File ‘c:\pic\cézanne.jpg’ does not exist”). ThumbView also crashes if it reads files ‘on it’s own’, that is when I only specify the directory. Is this a known bug, and/or is there a workaround for it? 2. As I see ThumbView reads filenames into a StringList which is sorted by default. It’s handy when someone works with complete directories, but can be a burden when someone specifies individual files by their URLs: first because the files are sorted according to their path, rather than their filename; second because I can no more identify which thumbnail belongs to which record entry. Or can I? Or is it possible to easily switch off the sorting feature? 3-4. Two more related questions. The SelectedItem method returns an individual item’s URL as I see, but is there a possibility to access an item from code? (I mean by its index within the URLList, or something like that.) And is it/could it be possible to add an object (a string or an integer) to the URL (like with a TlistBox)? Thanks for your attention, and thank to theo for this great component, cheers ---------------------------------------------------------------------- theo · 2011-06-14 17:44 1. Should work now, download again: http://www.theo.ch/lazarus/thumbview.zip 2. Comment calls to fMngr.Sort(0); in the source code (thumbcontrol.pas) 3. You have the source code. Do with it what you like ;-) For example you can get the Image from mouse-coords like this Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.ThumbControl1MouseMove(Sender: TObject; Shift: TShiftState; X,  Y: Integer);var itm:TThreadedImage;begin itm:=ThumbControl1.ItemFromPo int(Point(x,y)); if assigned(itm) then Caption:=itm.URL;end; ---------------------------------------------------------------------- sniperton · 2011-06-15 13:18 Thanks a lot, theo!