[wxpython-users] Button.SetBackgroundColour() on Solaris
by Andrew Cooke other posts by this author
May 28 2009 6:55AM messages near this date
Re: [wxpython-users] svn checkout command for trac ?
|
Re: [wxpython-users] Button.SetBackgroundColour() on Solaris
Hi,
I have some code that works fine on Windows and Linux, but which doesn't
change the background colour for Button on Solaris.
This is easy to reproduce within the demo. Insert the following as lines
20 and 21 in the Button demo code:
b.SetBackgroundColour('red')
b.SetForegroundColour('green')
and the demo will show green text, but on a grey (not red) background.
I am using Python2.5.2 (the version provided by Sun via OpenSolaris's
package manager) with the latest wxPython (2.8.10.1) built on OpenSolaris
2008.11. I will include below exact details on how to get the system
running in VirtualBox (which is a free VM from Sun that allows you to run
Solaris as a guest OS - it's quite nice) which is itself running in
OpenSuse 11.1 (64bit) (so this is Solaris i386).
Is this simply a limitation of the Solaris libraries? Is there some kind
of workaround? I have played with various things (setting parent or
children, calling refresh, clearbackground, etc) and nothing works;
GetBackgroundColour shows the expected value - it just doesn't appear on
the screen.
Thanks,
Andrew
PS This is a duplication of an issue reported by a client on some other
(older) version of Solaris, so it's not something new, or restricted to my
one instance, as far as I can tell.
OpenSolaris
-----------
(These notes from OpenSolaris 2008.11 running in VirtualBox)
[If installing OpenSolaris in VirtualBox:
- generate a new machine (default parameters are OK, but more memory helps)
- boot from OpenSolaris ISO
- from the desktop install OpenSolaris (avoid using an empty password)
- reboot
- install guest additions (you may need to unmount ISO from CDROM first)
- shut down system
- on main VirtualBox manager, change network for machine to bridged
- start system
- configure sudo using visudo as root]
Using the package manager, install:
- gcc and tools (SUNWgcc, gcc-dev)
- X11 headers (SUNWxorg-headers)
- GTK (SUNWgtk, SUNWgnome-common-devel)
- Python2.5 (SUNWPython25)
Even though Solaris can include wx widgets (but not wxPython), we build and
install our own here. This is because (1) the Python package depends on
the configure (and perhaps build) steps and (2) we avoid problems with
version mis-matches.
Download wxPython source from http://www.wxpython.org and install it,
following the instructions EXACTLY (summarised below):
- unpack
- create bld sub-directory and enter
- ../configure --prefix=/opt/wx/2.8 --with-gtk --with-gnomeprint --with-opengl --enable-
optimize --enable-debug_flag --enable-geometry --enable-graphics_ctx --enable-sound --wit
h-sdl --enable-mediactrl --enable-display --enable-unicode
- cat > .make
#!/usr/bin/bash
make $* && make -C contrib/src/gizmos $* && contrib/src/stc $*
^D
- chmod +x .make
- ./.make
- sudo ./.make install
- export PATH=/opt/wx/2.8/bin:$PATH
- export LD_LIBRARY_PATH=/opt/wx/2.8/lib:$LD_LIBRARY_PATH
- cd ../wxPython
- sudo python2.5 setup.py install
Update .bashrc or similar to include the PATH and LD_LIBRARY_PATH values.
To validate the wxPython install, run the demo (python2.5 demo.py in the
demo sub-directory of wxPython)/
_______________________________________________
wxpython-users mailing list
wxpython-users@[...].org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Thread:
Andrew Cooke
Robin Dunn
Andrew Cooke
Mike Driscoll
Chris Botos
|