wxMSW wxListCtrl selection/tracking behaves differently on light and dark mode (Issue #23846)

35 views
Skip to first unread message

PB

unread,
Sep 1, 2023, 11:12:16 AM9/1/23
to wx-...@googlegroups.com, Subscribed

Description

When using wxListCtrl in MSW dark mode, unlike in light mode:

  1. The item selection is not full row (as if LVS_EX_FULLROWSELECT was off).
  2. The items are not visibly hot tracked when hovered over with mouse.

wx-listview-select-dark

wx-listview-select-light

To reproduce:

Can be reproduced with unmodified listctrl sample.

BTW, unlike with 3.2.2.1, the master listctrl sample misbehaves when switching to virtual view (regardless of dark/light mode), but I did not investigate whether the issue is with the control or the sample.

Platform and version information

  • wxWidgets version: current GIT master
  • wxWidgets port: wxMSW
  • OS: Windows 10 22H2 v19045.3324


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23846@github.com>

VZ

unread,
Oct 29, 2023, 1:14:56 PM10/29/23
to wx-...@googlegroups.com, Subscribed

Is this only in list mode? To be honest, I only really care about wxListCtrl in report mode.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23846/1784171461@github.com>

PB

unread,
Oct 29, 2023, 1:30:41 PM10/29/23
to wx-...@googlegroups.com, Subscribed

Is this only in list mode?

AFAICT, in dark mode, there is no hot tracking in any of the list control modes.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23846/1784176601@github.com>

PB

unread,
Mar 18, 2024, 12:00:35 PM3/18/24
to wx-...@googlegroups.com, Subscribed

I tested if the lack of hot tracking in the dark mode was an issue in the wxListCtrl code or a limitation of the native listview. I used https://github.com/ysc3839/win32-darkmode/tree/delayload, the hot tracking works there:
listview-dark-hottracking.gif (view on web)

Since the listview sample is rather complex and uses custom drawing, I tested also with the minimal sample:

diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp
index 5f32257c6b..b23d7a4f63 100644
--- a/samples/minimal/minimal.cpp
+++ b/samples/minimal/minimal.cpp
@@ -26,6 +26,8 @@
     #include "wx/wx.h"
 #endif
 
+#include <wx/listctrl.h>
+
 // ----------------------------------------------------------------------------
 // resources
 // ----------------------------------------------------------------------------
@@ -175,6 +177,15 @@ MyFrame::MyFrame(const wxString& title)
     CreateStatusBar(2);
     SetStatusText("Welcome to wxWidgets!");
 #endif // wxUSE_STATUSBAR
+    wxListCtrl* listCtrl = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_SINGLE_SEL);
+
+    listCtrl->AppendColumn("Item");
+    listCtrl->AppendColumn("SubItem");    
+    for ( long i = 0; i < 10; ++i )
+    {
+        listCtrl->InsertItem(i, wxString::Format("Item %ld", i));
+        listCtrl->SetItem(i, 1, wxString::Format("SubItem %ld", i));
+    }
 }

But still no hot tracking. So it seems the issue is on wxWidgets side here.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23846/2004318090@github.com>

Steve Cornett

unread,
Aug 3, 2026, 1:56:08 PM (24 hours ago) Aug 3
to wx-...@googlegroups.com, Subscribed
stevecor left a comment (wxWidgets/wxWidgets#23846)

I do not see these problems in the latest master. The item selection is full width. I see hot tracking.


Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23846/5169919081@github.com>

PB

unread,
Aug 3, 2026, 2:16:42 PM (23 hours ago) Aug 3
to wx-...@googlegroups.com, Subscribed

Closed #23846 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/23846/issue_event/28905726360@github.com>

PB

unread,
Aug 3, 2026, 2:16:45 PM (23 hours ago) Aug 3
to wx-...@googlegroups.com, Subscribed
PBfordev left a comment (wxWidgets/wxWidgets#23846)

There are still issues with hot tracking but it is there, so closing.


Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23846/5170117046@github.com>

Reply all
Reply to author
Forward
0 new messages