UltimateListCtrl cannot set color for just column 0

Hi,

Using UltimateListCtrl, I can set a background color for any
individual cell EXCEPT those in column 0. When I try to set the
background color for a single cell in column 0, it instead sets the
color for the entire row.

The code below works in setting the cell in row 0, col 1 to red. But
if I change to .GetItem(0,0), it sets the entire row red.

item = self.lc.GetItem(0,1)
item.SetMask(ULC.ULC_MASK_BACKCOLOUR)
item.SetBackgroundColour(wx.RED)
self.lc.SetItem(item)

Is there some other way to set only column 0? [I suppose I could
save the values of all the rest of the cells in the row, then set
column 0 which results in setting the entire row, and then
individually restore each of the cells in column 1 and beyond. But
that would certainly be strange.]

ULC heavily basing it on the generic wxListCtrl version in C++, and
only added the ability to have sub-item formatting after that, as an
afterthought. So, as wx.ListCtrl does, when you set a custom text
colour/font/whatever on the first sub-item, ULC thinks that you want
to apply it to the whole row of items. If things like
SetItemTextColour(item, column) do not work, then it's not possible as
the code is right now.

I think your best bet is to open a bug report on wxTrac:

http://trac.wxwidgets.org/

Setting as component "AGW". I'll try and take a look when I get some
time but I am not sure it is easily fixable without breaking other
things (like the mixins for wx.ListCtrl when applied to ULC).

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

ยทยทยท

On 8 December 2011 03:31, luvspython wrote:
At the moment, there is unfortunately no other way to do it: I wrote