relima
relima

Reputation: 3423

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!

Upvotes: 3

Views: 2792

Answers (1)

AWainb
AWainb

Reputation: 868

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)

Upvotes: 1

Related Questions