wxPython ObjectListView shows any image as black square in column header

132 Views Asked by At

I'm developing a desktop application (not Web) with Python, using wxPython and ObjectListView (OLV) to present tables. Running on Windows 10.

The OLV does not left-align its column headers, as it leaves space for an image (including its sorting image). Even if I cancelled sorting, the heading are still indented (although less) and not left-aligned. In order to circumvent this, I am trying to set an image of my own into this header (using standard functionality of OLV: AddNamedImages method when instantiating the OLV, and headerImage in ColumnDefn), which fixes the alignment issue. HOWEVER, the image is always showing as a black square, regardless of my image size, format, content, transparent or not. See picture.

enter image description here

I tried 1x1 pixel image, BMP, PNG, JPG - nada. Always this black square. Any ideas / suggestions?

0

There are 0 best solutions below