Hi I am trying to have a wx.frame of a particular size and within it a
region that is coloured a separate background color using wx.Panel.
I am using the following code ( see below ) and running it on a Mac
as well
as in Ubuntu Linux. My Problem is that the wx.Panel element always
fills the
entire wx.Frame object. So instead of having a blue box (wx.Panel)
inside a
grey wx.Frame. The entire frame is blue. I dont know what I doing
wrong. I
did look at this example <http://wiki.wxpython.org/AnotherTutorial> ,
and so
I know it can be done . But the example uses grid-sizers and a
wx.Dialog
unlike my simpler case.
Here is my code that currently gnerates a blue square frame of size
300 instead of a frame which is gray with a small blue box.
Any help will be greatly appreciated
import wx
class PlateGui(wx.Frame):
def __init__(self, *args , **kwds):
self.frame = wx.Frame.__init__(self,*args, **kwds)
print "Made frame"
if __name__ == "__main__":
an_app = wx.PySimpleApp()
aframe = PlateGui(parent=None,id=-1,title="Test Frame",size=(300,
300))
pane = wx.Panel(parent=aframe,id=-1,size=(10,10))
pane.SetBackgroundColour(wx.Colour(0,0,255))
aframe.Show()
an_app.MainLoop()
print "Hello World"
Thanks
hari