wxGenericTreeCtrl bad highlight text contrast on MSW (Issue #26118)

28 views
Skip to first unread message

dsa-t

unread,
Jan 25, 2026, 5:04:35 PM (7 days ago) Jan 25
to wx-...@googlegroups.com, Subscribed
dsa-t created an issue (wxWidgets/wxWidgets#26118)

Description

Running treetest with USE_GENERIC_TREECTRL set to 1 on Win11, the text contrast of highlighted entries is not good (white on light-blue):

image.png (view on web)

Text color should be black like in native control (USE_GENERIC_TREECTRL is 0):

image.png (view on web)

Platform and version information

  • wxWidgets version you use: 3.3 (master)
  • wxWidgets port you use: wxMSW
  • OS and its version: Windows 11


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/26118@github.com>

VZ

unread,
Jan 25, 2026, 5:06:33 PM (7 days ago) Jan 25
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26118)

Should probably be simple enough to fix, but I wonder why do you prefer to use the generic version under MSW?


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/26118/3797312726@github.com>

dsa-t

unread,
Jan 25, 2026, 5:11:14 PM (7 days ago) Jan 25
to wx-...@googlegroups.com, Subscribed
dsa-t left a comment (wxWidgets/wxWidgets#26118)

It's much faster when the native one when deleting and re-adding many entries. At least when it's invisible.

Native:

image.png (view on web)

Generic:

image.png (view on web)


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/26118/3797317756@github.com>

VZ

unread,
Jan 25, 2026, 5:19:16 PM (7 days ago) Jan 25
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26118)

We almost certainly should call Freeze()/Thaw() before/after calling TreeView_DeleteAllItems(). But you should try using wxWindowUpdateLocker around the code recreating the items in the control in your code, this should help.


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/26118/3797326093@github.com>

dsa-t

unread,
Jan 25, 2026, 5:24:00 PM (7 days ago) Jan 25
to wx-...@googlegroups.com, Subscribed
dsa-t left a comment (wxWidgets/wxWidgets#26118)

We use wxWindowUpdateLocker already: https://gitlab.com/kicad/code/kicad/-/blob/0cda13206400db4b3114812b3538a1ab3ba2021b/eeschema/net_navigator.cpp#L340


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/26118/3797330959@github.com>

VZ

unread,
Jan 25, 2026, 5:32:24 PM (7 days ago) Jan 25
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26118)

OK, sorry, I didn't know this. Unfortunately I don't have any other ideas about improving its speed immediately. You might want to open an issue about this separately because there are advantages in using the native control, notably accessibility (but it also looks more natively, of course).


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/26118/3797338724@github.com>

VZ

unread,
Jan 27, 2026, 6:30:43 PM (5 days ago) Jan 27
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26118)

Took me more time than planned because I've also refactored the sample to allow testing the generic control more easily (e.g. to compare the performance with it later), but is finally done in the linked PR.

Please test it if you can, it does fix the problem of this issue, but I'd like to double check that it doesn't introduce any new ones. TIA!


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/26118/3808105822@github.com>

VZ

unread,
Jan 29, 2026, 6:10:02 PM (3 days ago) Jan 29
to wx-...@googlegroups.com, Subscribed

Closed #26118 as completed via 72c9f7e.


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/issue/26118/issue_event/22390668655@github.com>

Reply all
Reply to author
Forward
0 new messages