¡Hola, Invitado!


Patrocinantes


Síguenos en Facebook


Síguenos en Twitter

Compartir este tema:
[Código] Ejemplo de un SplashScreen
swik Sin conexión
Moderador Global
******

Mensajes: 352
Registro en: Jul 2010
Gracias dados: 31
Gracias recibidos: 37
Mensaje: #1
Ejemplo de un SplashScreen
  • Compartir en Delicious
  • Compartir en Digg
  • Compartir en Linkedin
  • Compartir en MySpace
  • Compartir en Technorati
  • Compartir en Tuenti
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()

[Imagen: moderadorglobal.png]
24-04-2011 11:45 PM
Buscar Citar




Usuario(s) navegando en este tema: 1 invitado(s)