|
|
Mensaje: #1
Ejemplo de un SplashScreen
Lenguaje PYTHON
import wx
class MyGUI(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title)
class MySplashScreen(wx.SplashScreen):
def __init__(self, parent=None):
aBitmap = wx.Image(name = "kedans.jpg").ConvertToBitmap()
splashStyle = wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT
splashDuration = 3000 # milisegundos
wx.SplashScreen.__init__(self, aBitmap, splashStyle,
splashDuration, parent)
self.Bind(wx.EVT_CLOSE, self.OnExit)
wx.Yield()
def OnExit(self, evt):
self.Hide()
MyFrame = MyGUI(None, -1, "Title")
app.SetTopWindow(MyFrame)
MyFrame.Show(True)
evt.Skip()
class MyApp(wx.App):
def OnInit(self):
MySplash = MySplashScreen()
MySplash.Show()
return True
app = MyApp(redirect=True, filename = "demo.log")
app.MainLoop()
|
|
| 24-04-2011 11:45 PM |
|