Can't add image to image list on wxMSW

I've created an ImageList to use with a ListCtrl, but I'm experiencing
some odd behavior. When I try to add one of the images to the ImageList
on MS Windows, I get a dialog saying "Couldn't add an image to the image
list", and the image does not appear in the application. Other images
work fine on Windows, and the image in question gets added to the image
list correctly on Linux. I've tried different image formats (of the
same image), but the problem continues.

Is this a bug, or could I be doing something wrong? I can post relevant
code upon request.

This is with wxPython 2.6.3.3 on WindowsXP.

-Hyrum

Hyrum K. Wright wrote:

I've created an ImageList to use with a ListCtrl, but I'm experiencing
some odd behavior. When I try to add one of the images to the ImageList
on MS Windows, I get a dialog saying "Couldn't add an image to the image
list", and the image does not appear in the application. Other images
work fine on Windows, and the image in question gets added to the image
list correctly on Linux. I've tried different image formats (of the
same image), but the problem continues.

Is this a bug, or could I be doing something wrong? I can post relevant
code upon request.

This is with wxPython 2.6.3.3 on WindowsXP.

Is it the same size as the other images?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

Hyrum K. Wright wrote:

I've created an ImageList to use with a ListCtrl, but I'm experiencing
some odd behavior. When I try to add one of the images to the ImageList
on MS Windows, I get a dialog saying "Couldn't add an image to the image
list", and the image does not appear in the application. Other images
work fine on Windows, and the image in question gets added to the image
list correctly on Linux. I've tried different image formats (of the
same image), but the problem continues.

Is this a bug, or could I be doing something wrong? I can post relevant
code upon request.

This is with wxPython 2.6.3.3 on WindowsXP.

Is it the same size as the other images?

Now it is. :slight_smile: Funny that this would only manifest itself on Windows and
not Linux.

Also, does this imply that for a given ListCtrl, all the images used
have to be of the same size?

Thanks,
-Hyrum

Hyrum K. Wright wrote:

Robin Dunn wrote:

Is it the same size as the other images?

Now it is. :slight_smile: Funny that this would only manifest itself on Windows and
not Linux.

On windows the native image list APIs are used, on Linux it is generic code that isn't as strict.

Also, does this imply that for a given ListCtrl, all the images used
have to be of the same size?

Yes, although you can have two image lists assigned to the listctrl, one for the large icon modes and one for the other modes.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

Hyrum K. Wright wrote:

Robin Dunn wrote:

Is it the same size as the other images?

Now it is. :slight_smile: Funny that this would only manifest itself on Windows and
not Linux.

On windows the native image list APIs are used, on Linux it is generic
code that isn't as strict.

Also, does this imply that for a given ListCtrl, all the images used
have to be of the same size?

Yes, although you can have two image lists assigned to the listctrl, one
for the large icon modes and one for the other modes.

Okay, I'll have to remember that.

Thanks for the help!

-Hyrum