A ImageList contains a list of images, which can be used to supply
images/icons to controls. The images are stored in an unspecified form
and can have masks for transparent drawing. The images in a list can be
supplied by a variety of classes including bitmaps and
icons. In almost all cases, it’s easier to use
Bitmap as the formats supported by this class are more
consistent across platforms.
ImageList is used in conjunction with TreeCtrl,
ListCtrl and Notebook classes. All of
these classes have methods to assign an ImageList to the control, and
then methods to select which image to use for a particular item within
the control, by using the index of the image in the list. Note that a
particular ImageList should only be assigned to one control – don’t try
to share an ImageList instance between different Windows.
Constructor specifying the image size, whether image masks should be created, and the initial size of the list.
Adds a new image using a bitmap and optional mask bitmap.
Integer add(%(arg-type)Bitmap% bitmap, Colour maskColour)Adds a new image using a bitmap and mask colour.
Integer add(%(arg-type)Icon% icon)Adds a new image using an icon.
Note that “<<” is an alias for “add”.
The new zero-based image index.
The original bitmap or icon is not affected by the add operation, and
can be deleted afterwards.
Initializes the list. See ImageList.new for details.
Draws a specified image onto a device context.
IMAGELIST_DRAW_NORMAL | Draw the image normally. |
IMAGELIST_DRAW_TRANSPARENT | Draw the image with transparency. |
IMAGELIST_DRAW_SELECTED | Draw the image in selected state. |
IMAGELIST_DRAW_FOCUSED | Draw the image in a focused state. |
Returns the bitmap corresponding to the given index.
Returns the icon corresponding to the given index.
Returns the number of images in the list.
Retrieves the size of the images in the list. Currently, the index
parameter is ignored as all images in the list have the same size.
true if the function succeeded, false if it failed (for example, if the image
list was not yet initialized).
Removes the image at the given position.
Removes all the images in the list.
Replaces the existing image with the new image.
Windows only.
Boolean replace(%(arg-type)Integer% index, Icon icon)Replaces the existing image with the new image.
true if the replacement was successful, false otherwise.
The original bitmap or icon is not affected by the replace operation,
and can be deleted afterwards.
[This page automatically generated from the Textile source at 2023-06-03 08:07:42 +0000]