listctrl and images

Hi,
I am using a listctrl in virtual mode. I have no images in the column/row data themselves (they are all text), but have images in the column headers owing to the use of the ColumnSorterMixin.

It seems that if I use an ImageList in the listctrl (necessary for the mixin), the control automatically adds a 'gap' between the left column edge and the start of the data in the first column, apparently allowing images to be prepended.

Is there a way to eliminate this 'gap' and have the first column data completely left aligned?

Thanks.

-g

gyrof wrote:

Hi,
I am using a listctrl in virtual mode. I have no images in the column/row data themselves (they are all text), but have images in the column headers owing to the use of the ColumnSorterMixin.

It seems that if I use an ImageList in the listctrl (necessary for the mixin), the control automatically adds a 'gap' between the left column edge and the start of the data in the first column, apparently allowing images to be prepended.

Is there a way to eliminate this 'gap' and have the first column data completely left aligned?

It's a 'feature' of the native list control on Windows. It assumes that if there is an image list then you want to have an image on each item. IIRC you can work around it by making an extra first column just for the image, and then setting the column width to zero.

ยทยทยท

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