ColourDialog doesn't use pre-set data for display

Martin Schulze joey at infodrom.org
Wed Mar 24 11:54:09 CET 2004


Hi!

I noticed an oddity in wxWidgets/Python/GTK.  It doesn't appear to
other widget set bindings though.  I've been able to track it down
with help of Robert Roebling and Robin Dunn from the wxWidgets
project.  This mail is just to inform you about the nature and fix for
the problem.

I discovered this problem with Thuban and located it in
Thuban.UI.classifier, but the real bug is somewhere inside the
GTK/Python binding to wxWidgets.

After creating the ColourDialog, pre-setting the colour the way Thuban
does it, doesn't seem to take the effects I expected.  Instead, the
dialog always displays black as selected colour, regardless of a
pre-setting (old value).

In the example below I set the colour to red (#FF0000) after the
dialog is created but before it is drawn on the screen.  However, on
my system it still displays black as selection instead of red.

This bug has been confirmed by Robin Dunn <robin at alldunn.com>, who is
responsible for the Python bindings of wxWidgets.  However, he
discovered that this problem can be bypassed by using a different
constructor and supplying the color data at the __init__ stage.

Commented out in the attached example is an adjusted version with
a workaround by Robin.

He is working on a fix for the underlying problem.  I've assigned
Debian Bug#239782 to this problem.  <http://bugs.debian.org/239782>

Regards,

	Joey

-- 
Still can't talk about what I can't talk about.  Sorry.  -- Bruce Schneier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wxcolor.py
Type: text/x-python
Size: 3118 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20040324/2d14fc9b/wxcolor.py


More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)