ListCtrl - horizontal and vertical rules have become darker in 4.2.1

I have noticed that since upgrading to wxPython 4.2.1, the horizontal and vertical ruled lines in the ListCtrl have become noticeably darker. I prefer the lighter lines used in previous versions - the darker lines in 4.2.1 tend to over-power the text.

Here is an example using Python 3.10.6 + wxPython 4.2.0 gtk3 (phoenix) wxWidgets 3.2.0 on Linux Mint 21.1.

Screenshot at 2023-05-27 20-29-59

And here using Python 3.10.6 + wxPython 4.2.1 gtk3 (phoenix) wxWidgets on Linux Mint 21.1


The documentation still refers to ‘light’ lines:

wx.LC_HRULES: Draws light horizontal rules between rows in report mode.

wx.LC_VRULES: Draws light vertical rules between columns in report mode.

I have searched for comments elsewhere referring to this change, but haven’t found anything so far. Does it happen on other platforms, or is it just on GTK?

Note, for the example, I reused the code from this thread: ListCtrl.GetSelectedItemCount() giving wrong result after DeleteItem()?

This is probably the relevant change:

1 Like

Thanks, Scott. I think you are right. I sampled the colours of the ruled lines in my examples and they match the system colours mentioned in that change exactly.

Sorry to jump into your thread Richard but for a ListCtrl using the “system style” (in my case coming from windows) is there a way change the thickness (e.g 1px instead of 2px wide)?

I like the additions that come with the windows style (e.g. automatic mouse over row colour) but the vertical lines are very thick when the background is coloured.

There is wx.LC_HRULES to “add” horizontal lines but I dont see a style element to remove them & at least on windows HRULES are active by default when taking the system default?