ThumbnailXpress 6 for ActiveX - User Guide > How To > Load & Display Thumbnails > Generate Thumbnails from Directory |
ThumbnailXpress™ enables loading of images from a directory, based on specified filter criteria. One or more filters can be defined, enabling customized search and display of thumbnail images. ThumbnailXpress keeps a list of filters that have been defined, and applies all enabled filters when loading images from a directory.
PDF support is deprecated in ImagXpress; instead, please use PDF Xpress for PDF support via the UsePdfXpressForPDFsOnly property. |
To add a filter, call AddFilterItem, specifying a name for the filter. An index is returned, uniquely identifying the filter in the list. The filter's name can be modified at any time by calling SetFilterName. The filter's index can be found at any time by calling FindFilterItemIndex and specifying the filter name. To delete all filters from the ThumbnailXpress control, call ClearFilters.
To assign search criteria to a filter, first call SetFilterType to specify the type of filter being defined. Filter types include:
Based on the filter type, additional filter criteria will be applied.
If filtering based on file name or directory name:
If filtering based on file attributes:
If filtering based on creation or modification date:
If filtering based on file size:
Filters are applied when loading images from a directory into the ThumbnailXpress control. All enabled filters will be applied to determine which images to load. Call SetFilterEnabled to indicate the filters to use. If no filters are enabled, then all folders and files will be loaded.
Call AddDirectoryItems to load images and generate thumbnails from all files in the specified directory. All enabled filters are applied, and only items that meet all filter criteria are loaded. A thumbnail image is then generated for each loaded image, and cached. When the control paints, the thumbnail images are displayed.
If the directory contains multi-page files, only the first page of the file is loaded. The thumbnail icon will show a "+" to indicate that the thumbnail is the first page in a multi-page file. Thumbnails of additional pages within the file can be added by calling AddFileItems. |