MDI Application with wxPython and Splash Screen

Hi everyone.-

I am trying to create a MDI application and i have succeded but the problem is that i want to add a Splash Screen and both things i cant mix, can anybody help me with this please?

Hi

Hi everyone.-

I am trying to create a MDI application and i have succeded but the problem
is that i want to add a Splash Screen and both things i cant mix, can
anybody help me with this please?

What kind of problem do you have?
Can you show some code?
Can you create just a splash screen?

Thank you.

···

On Mon, Aug 8, 2016 at 2:00 PM, Jorge Carretero Gulias <binarywritter@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi im new to wx.python, well almoust new to everything mi code is this

DO NOT EDIT

#----------------------------------------------------------------------#

This is a minimal wxPython program to show a SplashScreen widget.

Tian Xie

3/8/2005

#----------------------------------------------------------------------#

import wx

class MDIFrame(wx.MDIParentFrame):

def init(self):

wx.MDIParentFrame.init(self, None, -1, “MDI Parent”, size = (600,400))

menu = wx.Menu()

menu.Append(5000, “&New Window”)

menu.Append(5001, “&Exit”)

menubar = wx.MenuBar()

menubar.Append(menu, “&File”)

self.SetMenuBar(menubar)

self.Bind(wx.EVT_MENU, self.OnNewWindow, id = 5000)

self.Bind(wx.EVT_MENU, self.OnExit, id = 5001)

def OnExit(self, evt):

self.Close(True)

“def init(self, parent, id, title):”

“wx.Frame.init(self, parent, id, title)”

class MyGUI(wx.MDIParentFrame):

“”"

Hello World!

“”"

def init(self, parent, id, title):

ThexType=wx.MDIParentFrame.init(self, parent, id, title)

Put more GUI code here for a fancier application.

#----------------------------------------------------------------------#

class MySplashScreen(wx.SplashScreen):

“”"

Create a splash screen widget.

“”"

def init(self, parent=None):

This is a recipe to a the screen.

Modify the following variables as necessary.

aBitmap = wx.Image(name = “nvidia.jpg”).ConvertToBitmap()

splashStyle = wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT

splashDuration = 1000 # milliseconds

Call the constructor with the above arguments in exactly the

following order.

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, XType)

app.SetTopWindow(MyFrame)

MyFrame.Show(True)

evt.Skip() # Make sure the default handler runs too…

#----------------------------------------------------------------------#

class MyApp(wx.App):

def OnInit(self):

“frame = MDIFrame()”

“frame.Show()”

“win = wx.MDIChildFrame(self, -1, Child Window)”

“win.Show(True)”

MySplash = MySplashScreen()

MySplash.Show()

return True

#----------------------------------------------------------------------#

app = MyApp(redirect=True, filename = “demo.log”)

app.MainLoop()

``

Thank you very much and great forum

if i use a normal Frame it works but i want a MDI Form

Oh sorry heres the image of the splash

nvidia.jpg