Online Help
The ThumbList object plugin is a powerful and full-featured image thumbnail browser than can be easily added to your projects. Simply drop it onto a page in your project, point it a folder full of image files and the object does the rest! It's a real snap to add such a powerful imaging tool to your projects.
Features support for most common image formats (bmp, jpg, pcx, png, tga, tif, wmf, apm, emf, psd, pcd or gif) and color depths from 2 bpp to 32 bpp. It is also quite customizable with extensive control over thumbnail size, spacing, text labels, background color, padding and borders. Events such as "On Select", "On Double Click", "On Focus" and "On Key" are also included.
The width of the thumbnail that should be displayed in pixels. This width will be applied to all images that are displayed regardless of their original width.
The height of the thumbnail that should be displayed in pixels. This height will be applied to all images that are displayed regardless of their original height.
The vertical spacing between thumbnail items in the list in pixels. Note that this spacing should include enough space for the label that appears beneath each thumbnail image.
The horizontal spacing between thumbnail items in the list in pixels.
Whether the thumbnail image will have a "frame" around it. The frame is a rectangle with a border and fill color. You can also adjust the minimum padding between the image and the frame.
The color of the frame border if the "Show Frame Around Thumbnail" option is on.
The color of the frame's background if the "Show Frame Around Thumbnail" option is on.
The minimum number of pixels that should be around the thumbnail image on all four sides if the "Show Frame Around Thumbnail" option is on.
The style of window border that the list control will have. Choose from "None", "Thin" or "3D".
The type of label contents that will appear by default with each thumbnail item when it is added to the list. Choose from:
Note that you can change an item's label after it has been added to the list using the ThumbList.SetItemLabel action.
The method that will be used to resize images to fit into the thumbnail item area. Choose from:
The color of the list's background.
If on, the list's items will be automatically sorted in ascending alphabetical order by their label. If off, the items will appear in the order that they were added to the list.
If on, the user will be able to select more than one thumbnail item in the list at a time. If off, the list will be single selection only.
If on, the thumbnails will be arranged vertically. That is, if there are more than will fit on one line of the list, they will wrap into the next vertical row. If off, the thumbnails will be arranged horizontally. That is, they will appear in one row and a horizontal scrollbar will appear to allow scrolling.
If on, images that are smaller in dimensions than the thumbnail diaplay area will not be made larger to fill the available area. If off, images that are smaller in dimensions than the thumbnail diaplay area be made larger to fill the available area.
Fires when the list selection changes. You can determine which items are currently selected using the ThumbList.GetSelectedItems action.
Fires when the left mouse button is double-clicked on a thumbnail item. The e_Item event variable tells you the one-based index of the item that was double-clicked.
Fires when the list window recieves input focus.
Fires whenever the application window has focus and the user presses a key. The following event variables are automatically set whenever this event is triggered:
(number) The ASCII code of the key that was pressed.
(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it. There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.
In addition to the generic "Plugin" actions supported by all plugin objects, the ThumbList plugin also supports the following actions:
Adds image files to the list. Note that the control does not prevent you from adding the same file to the list twice.
(string) The name of the ThumbList object that you want to apply this action to.
(table) A numerically indexed table of files to add to the list. The file names can be full names such as "C:\\Images\\My_image.png" or a relative path to a file in the project's resources such as "AutoPlay\\Images\\my_image.png".
(string) The name of a function that will be called whenever a file is added to the list. When called this function will be passed the fully qualified filename of the current file as argument 1 and the index of which file is being added as argument 2. The function should return true to allow the action to continue processing or false to have it stop.
(number) The number of files added to the list.
-- This script prompts the user for a folder on their system and -- then adds all png, bmp and jpg files from that folder to the -- ThumbList strFolder = Dialog.FolderBrowse("Locate Image Folder",Shell.GetFolder(SHF_MYDOCUMENTS)); if(strFolder ~= "CANCEL")then tblImagesPng = File.Find(strFolder,"*.png"); tblImagesBmp = File.Find(strFolder,"*.bmp"); tblImagesJpg = File.Find(strFolder,"*.jpg"); nCounter = 1; tblImages = {}; if(tblImagesPng)then for i,fn in tblImagesPng do tblImages[nCounter] = fn; nCounter = nCounter + 1; end end if(tblImagesBmp)then for i,fn in tblImagesBmp do tblImages[nCounter] = fn; nCounter = nCounter + 1; end end if(tblImagesJpg)then for i,fn in tblImagesJpg do tblImages[nCounter] = fn; nCounter = nCounter + 1; end end if(tblImages)then ThumbList.AddFiles("img_list",tblImages); if(Application.GetLastError() ~= 0)then Dialog.Message("Error",Application.GetLastError()); end end end
Clears all items from the list.
(string) The name of the ThumbList object that you want to apply this action to.
Nothing.
-- Clear the contents of the ThumbList ThumbList.Clear("img_list");
Deletes an item from the list.
(string) The name of the ThumbList object that you want to apply this action to.
(number) The one-based index of the item to delete from the list.
Nothing.
-- Delete item 3 ThumbList.DeleteItem("img_list", 3);
Returns the number of items in the list.
(string) The name of the ThumbList object that you want to apply this action to.
(number) The number of items in the list.
-- Show a message box with the number of items in the list nNumItems = ThumbList.GetItemCount("img_list"); Dialog.Message("Number of Items",nNumItems);
Returns a table that contains information about the specified item.
(string) The name of the ThumbList object that you want to apply this action to.
(number) The one-based index of the item to retrieve information about.
(table) A table of information about the item. The table has the following indexes:
The action returns nil if there was an error or the index is out of range.
-- Show a message box that contains the -- full path and filename of the image at -- index 5 tblInfo = ThumbList.GetItemInfo("img_list",5); if(tblInfo)then Dialog.Message("hi",tblInfo.filepath); end
Returns the a numerically indexed table that contains the indexes of items that are selected in the list.
(string) The name of the ThumbList object that you want to apply this action to.
(table) A numerically indexed table that contains the indexes of items that are selected in the list or nil if there is an error or there are no selected items.
-- Show a message box with all of the currently selected indexes tblSelected = ThumbList.GetSelectedItems("img_list"); if(tblSelected)then strOutput = ""; nNumItems = Table.Count(tblSelected); for j=1,nNumItems do strOutput = strOutput..tblSelected[j]..","; end strOutput = String.TrimRight(strOutput,","); Dialog.Message("Selected",strOutput); end
Selects an item in the list. If the list has multiple selection turned on, the specified item will be selected as well as any other items that were already selected. If the list is single-select, the specifed item will be selected and all other items will be deselected.
(string) The name of the ThumbList object that you want to apply this action to.
(number) The one-based index of the item to select. You can pass -1 as the Index to select, all items will be unselected.
-- Select item 3 ThumbList.SelectItem("img_list", 3);
Sets the label text of an item in the list.
(string) The name of the ThumbList object that you want to apply this action to.
(number) The one-based index of the item to change the label of.
(string) The new label text.
-- Set item 1's label ThumbList.SetItemLabel("img_list", 1, "I'm number one!");
Sets the height (in pixels) of all items in the list.
(string) The name of the ThumbList object that you want to apply this action to.
(number) The new height of the thumbnail items in pixels.
-- Set the thumbnail height to 50 ThumbList.SetThumbHeight("img_list", 50);
Sets the width (in pixels) of all items in the list.
(string) The name of the ThumbList object that you want to apply this action to.
(number) The new width of the thumbnail items in pixels.
-- Set the thumbnail width to 100 ThumbList.SetThumbWidth("img_list", 100);
Sets the horizontal spacing (in pixels) of all items in the list.
(string) The name of the ThumbList object that you want to apply this action to.
(number) The new horizontal spacing of all list items in pixels.
-- Set the thumbnail horizontal spacing to 200 ThumbList.SetHSpacing("img_list", 200);
Sets the vertical spacing (in pixels) of all items in the list.
(string) The name of the ThumbList object that you want to apply this action to.
(number) The new vertical spacing of all list items in pixels.
-- Set the thumbnail vertical spacing to 200 ThumbList.SetVSpacing("img_list", 200);
1100 - Could not find the specified plugin object or the plugin object is of the wrong type.
Indigo Rose Corporation
support.indigorose.com
The ThumbList Object Plugin is copyright © 2003-2006 Indigo Rose Software Design Corporation.
Copyright © 2003-2006 Indigo Rose Software Design Corporation.
All Rights Reserved.