Ok, here's what I've got so far after reviewing and attempting to understand how to use wxSplashscreen after reading the docs.
class MyApp(wxFrame):
def __init__(self, *args, **kwds):
# begin wxGlade: MyApp.__init__
kwds["style"] = wxSIMPLE_BORDER
wxFrame.__init__(self, *args, **kwds)
self.bitmap_1 = wxStaticBitmap(self, -1, wxBitmap("C:\\Documents and Settings\\patrick\\My Documents\\MyDevelopment\\FS Development\\SplashControl\\SplashControl_Splash.bmp", wxBITMAP_TYPE_ANY))
self.__set_properties()
#self.__do_layout()
self.splash = wxSplashScreen(self.bitmap_1, wxSPLASH_TIMEOUT, 6000, NULL, -1, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER)
# end wxGlade
def __set_properties(self):
# begin wxGlade: MyApp.__set_properties
self.SetTitle("frame_1")
# end wxGlade
def __do_layout(self):
# begin wxGlade: MyApp.__do_layout
sizer_1 = wxBoxSizer(wxVERTICAL)
#sizer_1.Add(self.bitmap_1, 0, 0, 0)
self.SetAutoLayout(1)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
sizer_1.SetSizeHints(self)
#self.Layout()
# end wxGlade
# end of class MyApp
if __name__ == "__main__":
app = wxPySimpleApp(0)
wxInitAllImageHandlers()
frame_1 = MyApp(None, -1, "")
app.SetTopWindow(frame_1)
frame_1.Show(1)
app.MainLoop()
I'm obviously doing somethings wrong. I really don't want the dialog and the splash, just the splash... and I get this error when I run the program:
>python -u "SplashControl-1.0.py"
Traceback (most recent call last):
File "SplashControl-1.0.py", line 43, in ?
frame_1 = MyApp(None, -1, "")
File "SplashControl-1.0.py", line 18, in __init__
self.splash = wxSplashScreen(self.bitmap_1, wxSPLASH_TIMEOUT, 6000, NULL, -1, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER)
File "C:\bin\DEVELO~1\python23\lib\site-packages\wxPython\frames.py", line 279, in __init__
self.this = framesc.new_wxSplashScreen(*_args,**_kwargs)
TypeError: Type error in argument 1 of new_wxSplashScreen. Expected _wxBitmap_p.
23:17:14: Debug: e:\Projects\wx2.4\src\msw\app.cpp(439): 'UnregisterClass(canvas)' failed with error 0x00000584 (class still has open windows.).
>Exit code: 1
Any direction would be greatly appreciated.
Patrick
···
At 08:57 PM 11/4/2003 -0800, you wrote:
=)
Ok, now I feel like the total beginner I am! Thanks guys. I only just downloaded the wxWindows docs, after finally finding them. I'm sure this will work.
Patrick
At 12:01 AM 11/5/2003 -0800, you wrote:
I'm going to suggest the obvious: wx.SplashScreen. Appologies if I missed
that you had looked at that already.
> -----Original Message-----
> From: P.T. Waugh MA [mailto:ptwaugh@earthlink.net]
> Sent: Tuesday, November 04, 2003 20:18
> To: wxPython-users@lists.wxwindows.org
> Subject: Re: [wxPython-users] making a GUI time out
>
> wxProcessDialog isn't what I'm looking for.
>
> I have created a program that does some simple stuff to setup a Windows
> program which it then finds and executes before exiting.
>
> Now, I want to have a small "splash window" come up (the GUI piece) while
> the main program executes. However, the GUI goes into its mainloop() and
> never ends (as there is no btn for the user to exit it). I want
> to get the
> small GUI window to stay up for like 5 seconds, then die on its
> own without
> the user having to close it.
>
> Anyone point me in the right direction? Now that I've found the
> wxWindows
> docs, I'm looking at those too.
>
> Thanks.
>
> At 07:00 PM 11/4/2003 -0800, you wrote:
> >Thanks, I'll check that out =)
> >
> >At 07:39 PM 11/4/2003 -0600, you wrote:
> >>You might want to look at wxprogressdialog. I think that might meet your
> >>needs.
> >>
> >>On Tue, 2003-11-04 at 14:33, P.T. Waugh MA wrote:
> >> > Hi,
> >> >
> >> > I've written a python program that does some simple stuff:
> opens a config
> >> > file, execs a windows program that connects to a server, and
> does a couple
> >> > of other things before starting a program and terminating.
> >> >
> >> > I'd like to have the program throw up a splash screen while it's
> >> > exec'ing. I've created a "GUI" in wxGlade, but perhaps this
> isn't the
> >> best
> >> > method as it goes into its mainloop() and then the main
> python program
> >> waits.
> >> >
> >> > Is there a better approach? Or, should I create some kind of timer
> >> > function that somehow terminates the mainloop()?
> >> >
> >> > I've looked through all my books on Python, and have had no
> luck finding
> >> > anything similar to learn from.
> >> >
> >> > Thanks
> >> >
> >> > Patrick
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail:
> wxPython-users-unsubscribe@lists.wxwindows.org
> >> > For additional commands, e-mail:
> wxPython-users-help@lists.wxwindows.org
> >> >
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
> >>For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
> >For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
> For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org