[wxPython-users] Using color names on Windows vs. Linux
Robin Dunn
robin at alldunn.com
Wed Apr 25 14:18:39 PDT 2007
Stefan Reichör wrote:
> Hi!
>
> I'd like to use some colors in global python variables. The colors are
> correctly defined on linux. On Windows they are wrong after the
> "import wx" statement. They are valid after I have created an
> application object. I use wxPython2.8.1.1 on Windows.
>
> I think this behaviour is a bug.
The color database object used to translate names to colors is not
initialized until the App object is created. (Actually you're lucky
that the only problem you get is a bad color value, and not a crash.)
IIRC the color name lookup was recently changed on wxGTK to use a
different technique so that is why it happens to be working for you
there, although I thought that the color database was still involved
somehow...
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list