TTMSFNCBitmapContainer Class
Non-visual component that holds a named collection of bitmaps and makes them available to controls via the
ITMSFNCBitmapContainerinterface.
API unit family: TMSFNCBitmapContainer
Inherits from: TTMSFNCCustomComponent
Implements: ITMSFNCBitmapContainerGetItem
Syntax
TTMSFNCBitmapContainer = class(TTMSFNCCustomComponent, ITMSFNCBitmapContainerGetItem)
Properties
| Name | Description |
|---|---|
| BitmapNames | Returns the name of the bitmap item at the specified index. |
| Bitmaps | Returns the bitmap at the specified index in the collection. |
| Items | The collection of named bitmap items managed by this container. |
| Version | The component version string. |
Methods
| Name | Description |
|---|---|
| AddFromFile | Loads a bitmap from a file and adds it to the collection with the specified name. |
| AddFromFolder | Loads all image files matching a path pattern from a folder and adds them to the collection. |
| AddFromResource | Adds a bitmap from an application resource and assigns it the specified name. |
| AddFromURL | Downloads a bitmap from a URL and adds it to the collection with the specified name. |
| Changed | Notifies all registered controls that the bitmap collection has changed. |
| FindBitmap | Loads the bitmap at the specified index into the supplied bitmap object. |
| GetItem | Returns the TTMSFNCBitmapItem at the specified index. |
| ItemCount | Returns the total number of bitmap items in the collection. |
| RandomBitmap | Returns a randomly selected bitmap from the collection. |
| RandomBitmapName | Returns the name of a randomly selected bitmap item from the collection. |
| RegisterControl | Registers a control so that it is notified when the bitmap collection changes. |
Events
| Name | Description |
|---|---|
| OnBitmapChanged | Fires when any bitmap in the collection changes. |