Hi,
I'm trying to create a background image on a wxFrame
and not having much luck. Below I have some code wich
adds an image and then some controls. The Controls
show up and are accessable via keyboard, but not mouse
clicks.
Is there something I'm doing wrong? Is there a better
way?
Thanks,
Seth.
···
-------------------------------------------------
from wxPython.wx import *
import string
class MainWindow(wxFrame):
wxInitAllImageHandlers()
def __init__(self,parent,id,title):
wxFrame.__init__(self,parent,-4, title, size =
( 400,400),
style=wxDEFAULT_FRAME_STYLE)
bmp = wxBitmap('Winter.jpg',
wxBITMAP_TYPE_JPEG)
staticBmpCtrl = wxStaticBitmap(self, -1, bmp,
(0, 0))
button1 = wxButton(self, 10, "Hello",
wxPoint(20, 20))
button2 = wxButton(self, 20, "goodby",
wxPoint(200, 200))
self.SetAutoLayout(true)
EVT_BUTTON(self, 10, self.OnClick1)
EVT_BUTTON(self, 20, self.OnClick2)
self.Show(true)
self.Refresh()
def OnClick1(self, event):
print "OnClick1"
def OnClick2(self, event):
print "OnClick2"
app = wxPySimpleApp()
frame = MainWindow(None, -1, "background try")
app.MainLoop()
#----------------------------------------------------------------------
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com