Hi,
I' am new to python and wxPython
and I try some python scripts on a Linux-System:
Linux 2.6.11.4-21.17-smp
Python 2.4
wxPython 2.8.4.2
Problem:
I do not manage to set and see any background colour.
I try to understand sizers
and I run this from http://wiki.wxpython.org/UsingSizers
···
----------------------------------------------------------
#!/usr/bin/python
import wx
class MyFrame(wx.Frame):
def __init__(self, parent, ID, title):
wx.Frame.__init__(self, parent, ID, title, size=(300, 250))
panel1 = wx.Panel(self,-1, style=wx.SUNKEN_BORDER)
panel2 = wx.Panel(self,-1, style=wx.SUNKEN_BORDER)
panel1.SetBackgroundColour("BLUE")
panel2.SetBackgroundColour("RED")
box = wx.BoxSizer(wx.VERTICAL)
box.Add(panel1, 2, wx.EXPAND)
box.Add(panel2, 1, wx.EXPAND)
self.SetAutoLayout(True)
self.SetSizer(box)
self.Layout()
app = wx.PySimpleApp()
frame = MyFrame(None, -1, "Sizer Test")
frame.Show()
app.MainLoop()
----------------------------------------------------------
It appears, sizers work,
but no background colours.
The background is always grey.
Also an all other scripts I tried so far.
What is the problem??
Thanks for any help.
Grüessli
--
Kurt Müller:
kurt.mueller@aerodynamics.ch