wxListCtrl and background colours.

Skip to first unread message

Tony Kennedy

Jul 13, 2022, 5:41:07 AMJul 13
to wx-users
Hi all,

I'm trying to get the colours on a wxListCtrl to work in dark mode.

The problem is, I cannot find out how to set the background of the area that contains the data. I can change the header background, text colour and item background easily enough.

Any ideas? I've attached an image showing the area I want to apply the colour to. Ignore the "red" background on the items in the list, this is me testing things.

Thanks in advance,


Tony Kennedy

Jul 13, 2022, 6:34:58 AMJul 13
to wx-users
Found out how to do it, so replying here in case anyone else finds they need to do this.

Call wxWindow::GetbackgroundColour() and  wxWindow::SetbackgroundColour() on the wxListCtrl, this will give you the grey area in my image above.

Reply all
Reply to author
0 new messages