wxWidgets icon indicating copy to clipboard operation
wxWidgets copied to clipboard

The effect that appears when you hover over a row in a wxListCtrl is broken

Open BazaarAcc32 opened this issue 9 months ago • 1 comments

I have a virtual wxListCtrl (REPORT MODE) with wxLC_HRULES | wxLC_VRULES set. Because of these flags set, a grid appears. When I hover over a specific element in Dark Mode (Windows), the grid around that element disappears, which creates a visual effect of the element being selected when hovering over it. Here is screenshot: https://i.ibb.co/CKQrxnVL/list-ctrl.png (third row hovered)

But here's the thing, I call wxListCtrl::Refresh every 3 seconds to refresh the table data, and after calling Refresh, the grid around the hovered element is restored again due to redrawing.

If wxWidgets interprets hovering an element as removing the grid around it, then this behavior should persist after calling Refresh (My opinion is that instead of the grid disappearing, the whole row should be highlighted in blue/gray when the mouse is over the element).

Here is the code through which you can reproduce the problem: https://pastebin.com/LXfAFVRx

wxWidgets version: newly released 3.3.0 wxWidgets port: wxMSW OS: Windows 11 Theme: Dark Mode

BazaarAcc32 avatar Jul 22 '25 08:07 BazaarAcc32

As I wrote on forum, this:

  1. Can be reproduced in the unmodified listctrl sample.
  2. May be caused by hottracking drawn over the item including rulers with the same color as used for selection, see #23846.

PBfordev avatar Jul 22 '25 08:07 PBfordev