Hi,
I've been fiddling with this for a while, but have been having a few issues
with row background colour and font.
In the name of legibility, I wanted to have this list colour every other row
a light grey colour, and set all lines to 18 point font.
The problem I'm having is, if I set the font before changing the colour, the
font completely resets back to the system size;
If I set the colour first, the font overrides the background colours with
white. Is there something I'm doing wrong?
Nothing that I can see, it's probably a bug in ULC but I am unable to
pin it down. Fortunately, there is a workaround. You should do the
following:
1) If you dont have it already, get the SVN version of ULC here:
http://svn.wxwidgets.org/viewvc/wx/wxPython/3rdParty/AGW/agw/ultimatelistctrl.py?view=co
And overwrite the one in wx.lib.agw;
2) In ultimatelistctrl.py, comment out the line 2676 (i.e., the line
that contains the "del self._backColour" code);
3) Try the attached file.
I'll fix the SVN version tonight when I get home.
Also, I'd like to be able to set individual cell fonts, for example
everything in the Name column to boldfont, but I've
only seen so far the ultimateListCtrl.SetItemFont() method, which only
controls a single row.
Something like this should work:
mask = ULC.ULC_MASK_FONT
item = self.ultimateList.GetItem(row, col)
item.SetMask(mask)
item.SetFont(your_font)
self.ultimateList.SetItem(item)
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
UltimateList.py (4.8 KB)
···
On 25 April 2012 09:39, redxine wrote: