Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wxpython - setting background color of a listctrl of a CELL, not of the entire row

Is it possible to set the background color of a cell in a wxpython listctrl object? I have found SetItemTextColour() and the SetItemBackgroundColour() but both only change the colors for the entire row.

Any ideas? Thanks!

like image 268
relima Avatar asked Dec 27 '25 22:12

relima


1 Answers

You might want to switch to an UltimateListCtrl to achieve your goals, take a look in the wxPython demo for an example of how to accomplish your goals their sample has single-celled background adjustments. You can also checkout the AGW home page for more information and updated version.

from wx.lib.agw import ultimatelistctrl as ulc

self.uListCtrl = ulc.UltimateListCtrl(self, -1, agwStyle=ulc.ULC_REPORT | ulc.ULC_SINGLE_SEL)

like image 193
AWainb Avatar answered Dec 30 '25 23:12

AWainb