I had been referred to lib/splashscreen class in response to a previous
question on creation of splash screen.The documentation states that the
class has been deprecated.I am trying to use wxSPlashScreen class to
create a splash Screen.
Here is what I have come up with so far.
Help me out with understanding the inheritance in python
by this practical example.
#import all modules from wxPython
from wxPython.wx import *
#define a class SplashScreen that inherits wxSplashScreen
class SplashScreen(wxSplashScreen):
# Default = defined default value for the given variable
def __init__(self,bitmapfile,splashStyle,milliseconds,parent,id,
pos = Default,size = Default,style = Default):
#I am calling the __init__ method of wxSplashScreen as the-
#constructor is not inherited automatically
# Although wxWindows defines the constructor as receiving
#a wxBitMap object as first argument Can we use a
# bit map file string?
wxSplashScreen.__init_(self,bitMapPath,
wxSPLASH_CENTER_ON_SCREEN,6000,None,-1)
class splashApp(wxApp):
def OnInit(self):
wxInitAllImageHandlers()
#make an instance of SplashScreen)
splash = SplashScreen("file.bmp",wxSPLASH_CENTER_ON_SCREEN_,6000,None,-1)
splash.Show(true)
splash.SetTopWindow(splash)
return true
def main():
appinstance = splashApp(0)
appinstance.MainLoop()
if__name__ == '__main__'
main()
My questions?
while running in debug mode, it says wxSPLASH_CENTER_ON_SCREEN is not
defined?
but it is a valid argument in wxWindows
How do I set up a bit map into the splash screen
Does any one have an example of using the wxSplashScreen class;
not the one in lib/splashscreen which apparently is deprecated.
Some of these might be basic but I am new to python and have programming
experience in c (only a quarter worth)
Thanks
satyam
···
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor