Inheritance diagram for wx.ImageList:
A wx.ImageList contains a list of images, which are stored in an unspecified form. Images can have masks for transparent drawing, and can be made from a variety of sources including bitmaps and icons.
wx.ImageList is used principally in conjunction with wx.TreeCtrl and wx.ListCtrl classes.
See also
Constructor specifying the image size, whether image masks should be created, and the initial size of the list.
Parameters:
Returns:
Adds a new image using a bitmap.
Parameters:
Returns:
int
Note
The original bitmap or icon is not affected by the Add operation, and can be deleted afterwards. If the bitmap is wider than the images in the list, then the bitmap will automatically be split into smaller images, each matching the dimensions of the image list. This does not apply when adding icons.
Note
The original bitmap or icon is not affected by the Add operation, and can be deleted afterwards. If the bitmap is wider than the images in the list, then the bitmap will automatically be split into smaller images, each matching the dimensions of the image list. This does not apply when adding icons.
Adds a new image using a bitmap and a mask colour.
Parameters:
Returns:
int
Note
The original bitmap or icon is not affected by the Add operation, and can be deleted afterwards. If the bitmap is wider than the images in the list, then the bitmap will automatically be split into smaller images, each matching the dimensions of the image list. This does not apply when adding icons.
Draws a specified image onto a device context.
Parameters:
index (int): Image index, starting from zero.
dc (wx.DC): Device context to draw on.
x (int): X position on the device context.
y (int): Y position on the device context.
flags (int): How to draw the image. A bitlist of a selection of the following:
wx.ImageList Flags |
Description |
---|---|
wx.IMAGELIST_DRAW_NORMAL |
Draw the image normally. |
wx.IMAGELIST_DRAW_TRANSPARENT |
Draw the image with transparency. |
wx.IMAGELIST_DRAW_SELECTED |
Draw the image in selected state. |
wx.IMAGELIST_DRAW_FOCUSED |
Draw the image in a focused state. |
solidBackground (bool): For optimisation – drawing can be faster if the function is told that the background is solid.
Returns:
bool
Returns the bitmap corresponding to the given index.
Parameters:
Returns:
Returns the icon corresponding to the given index.
Parameters:
Returns:
Returns the number of images in the list.
Returns:
int
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.
Parameters:
Returns:
bool
Removes the image at the given position.
Parameters:
Returns:
bool
Removes all the images in the list.
Returns:
bool
Replaces the existing image with the new image.
Parameters:
Returns:
bool
Note
The original bitmap or icon is not affected by the Replace operation, and can be deleted afterwards.