A PyImageList contains a list of images. Images can have masks for transparent drawing, and can be made from a variety of sources including bitmaps and icons.
PyImageList is used in conjunction with UltimateListCtrl.
Note
The main improvements that PyImageList introduces is the removal of the limitation of same-size images inside the image list. If you use the style IL_VARIABLE_SIZE then each image can have any size (in terms of width and height).
__init__ | Default class constructor. |
Add | Adds a new image or images using a bitmap. |
AddIcon | Adds a new image using an icon. |
AddWithColourMask | Adds a new image or images using a bitmap and a colour mask. |
Draw | Draws a specified image onto a device context. |
GetBitmap | Returns the bitmap corresponding to the given index, or wx.NullBitmap |
GetIcon | Returns the icon corresponding to the given index, or wx.NullIcon |
GetImageCount | Returns the number of images in the list. |
GetSize | Retrieves the size of an image in the list. |
Remove | Removes the image at the given position. |
RemoveAll | Removes all the images in the list. |
Replace | Replaces the existing image with the new bitmap. |
ReplaceIcon | Replaces the existing image with the new icon. |
A PyImageList contains a list of images. Images can have masks for transparent drawing, and can be made from a variety of sources including bitmaps and icons.
PyImageList is used in conjunction with UltimateListCtrl.
Note
The main improvements that PyImageList introduces is the removal of the limitation of same-size images inside the image list. If you use the style IL_VARIABLE_SIZE then each image can have any size (in terms of width and height).
Default class constructor.
Parameters: |
|
---|
Adds a new image or images using a bitmap.
Parameters: | bitmap – a valid wx.Bitmap object. |
---|---|
Returns: | The new zero-based image index. |
Note
If the bitmap is wider than the images in the list and you are not using the IL_VARIABLE_SIZE style, then the bitmap will automatically be split into smaller images, each matching the dimensions of the image list.
Adds a new image using an icon.
Parameters: | icon – a valid wx.Icon object. |
---|---|
Returns: | The new zero-based image index. |
Note
If the icon is wider than the images in the list and you are not using the IL_VARIABLE_SIZE style, then the icon will automatically be split into smaller images, each matching the dimensions of the image list.
Adds a new image or images using a bitmap and a colour mask.
Parameters: | |
---|---|
Returns: | The new zero-based image index. |
Note
If the bitmap is wider than the images in the list and you are not using the IL_VARIABLE_SIZE style, then the bitmap will automatically be split into smaller images, each matching the dimensions of the image list.
Draws a specified image onto a device context.
Parameters: |
|
---|
Returns the bitmap corresponding to the given index, or wx.NullBitmap if the index is invalid.
Parameters: | index – the bitmap index. |
---|
Returns the icon corresponding to the given index, or wx.NullIcon if the index is invalid.
Parameters: | index – the icon index. |
---|
Retrieves the size of an image in the list.
Parameters: | index – the zero-based index of the image. |
---|---|
Returns: | a tuple of (width, height) properties of the chosen bitmap. |
Removes the image at the given position.
Parameters: | index – the zero-based index of the image to be removed. |
---|
Replaces the existing image with the new bitmap.
Parameters: |
|
---|