TTMSFNCURLBitmapContainer Class
Bitmap container that automatically downloads images from URLs in a background thread and caches them by name for use by connected controls.
API unit family: TMSFNCURLBitmapContainer
Inherits from: TTMSFNCBitmapContainer
Syntax
TTMSFNCURLBitmapContainer = class(TTMSFNCBitmapContainer)
Properties
| Name |
Description |
| DefaultBitmap |
Bitmap returned by FindBitmap when the requested name has not yet been downloaded. |
| Items |
The collection of URL bitmap items managed by this container. |
Methods
| Name |
Description |
| AddFromURL |
Adds a new item with the given URL and name, then starts a background download if no download is already in progress. |
| Download |
Synchronously downloads the content of the given URL and returns it as a memory stream; the caller owns the stream. |
| FindBitmap |
Returns the cached bitmap with the specified name, or the default bitmap when no match is found. |
| FindBitmapByURL |
Returns the bitmap item whose URL matches AURL, or nil if not found. |
Events
| Name |
Description |
| OnDownloadComplete |
Fired when the background download for one item completes successfully. |
| OnDownloadProgress |
Fired periodically during a background download with the current position and total size in bytes. |