[wxPython] selected item color control

All selected list items are highlighted by white on yellow background by
default. Totally unreadable. How do I control the foreground/background
colors of a selected item?

As best I can figure out, without being a C++ programmer, is that wxGTK
simply toggles the foreground color from black to white and uses background
color from current theme of host window manager. Is this true? If so, then
it sucks for KDE users.

As best I can figure out, without being a C++ programmer, is that wxGTK
simply toggles the foreground color from black to white and uses

background

color from current theme of host window manager. Is this true?

Close. It chooses either black or whight based on what the default system
selection color is:

case wxSYS_COLOUR_HIGHLIGHTTEXT:
{
    if (!g_systemHighlightTextColour)
    {
        wxColour hclr = GetSystemColour(wxSYS_COLOUR_HIGHLIGHT);
        if (hclr.Red() > 200 && hclr.Green() > 200 && hclr.Blue() > 200)
            g_systemHighlightTextColour = new wxColour(*wxBLACK);
        else
            g_systemHighlightTextColour = new wxColour(*wxWHITE);
    }
    return *g_systemHighlightTextColour;
}

If so, then
it sucks for KDE users.

Well this is Open Source so instead of just complaining about it you could
implement a better solution and submit a patch, you don't have to know much
C/C++ to figure out what's going on in the code above. At the very least a
bug report is warrented, but be sure to include more information than you
gave me (like platform, version, which class you are talking about, sample
code, etc.) or most people will just ignore it.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

<snip>

Well this is Open Source so instead of just complaining about it you could
implement a better solution and submit a patch, you don't have to know much
C/C++ to figure out what's going on in the code above. At the very least a
bug report is warrented, but be sure to include more information than you
gave me (like platform, version, which class you are talking about, sample
code, etc.) or most people will just ignore it.

Sorry, Robin. I didn't mean to piss you off. My statement was more in the
spirit of "Aw, shucks." I assumed that wxGTK was adequate indication that it
was Linux I was talking about and it seemed to me to be a problem that
affected more than just a single class. I noticed the behaviour in trees,
lists, grids, and all other situations where text highlighting was being done.

Yes, it is Open Source and I should have been more sensitive. I apologize.
And thank you for your work.

···

On Saturday 26 May 2001 17:27, Robin Dunn wrote: