[wxPython-users] Splash screen positioning

wormwood_3 wormwood_3 at yahoo.com
Mon Oct 1 05:18:51 PDT 2007


That totally worked, Roee. Thanks so much! 

So now instead of defining self.frame, the code calls the init for wx.Frame. I am having a hard time getting my head around the essential difference, but that is just a result of me not understanding Python very well yet.

Thanks,
Sam

----- Original Message ----
From: roee shlomo <roee88 at gmail.com>
To: wxPython-users at lists.wxwidgets.org
Sent: Monday, October 1, 2007 4:59:58 AM
Subject: Re: [wxPython-users] Splash screen positioning

I fixed your code:

 



import wx

class App(wx.App):
   def OnInit(self):
       frame = Frame()
       frame.Show()
       return True

class Frame(wx.Frame):
   def __init__(self):

       # Set up the frame
       wx.Frame.__init__(self, None, id = -1, title = "Domainspotter!", pos = (300, 200), size = (700, 600))

       # Show logo splash screen while things startup
       splashimg = wx.Image("resources/logo.png", wx.BITMAP_TYPE_PNG).ConvertToBitmap()
       wx.SplashScreen(splashimg, wx.SPLASH_CENTRE_ON_PARENT
 | wx.SPLASH_TIMEOUT, 2000, self, -1)
       wx.Yield()

a = App()
a.MainLoop()

 

- Roee.

 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20071001/e0238f70/attachment.htm


More information about the wxpython-users mailing list