[wxPython-users] Re: wx.SplashScreen and animated GIF

Robin Dunn robin at alldunn.com
Wed Mar 7 22:44:57 PST 2007


Hannes MŸueller wrote:
> Christopher Barker wrote:
>>
>> Hannes MŸueller wrote:
>> He would like to have some kind of animated GIF playing,
>>> while the application initializes.
>>>
>>> Is there any way to accomplish this?
>>
>> wx.animate.GIFAnimationCtrl()
>>
>> might help.
>>
>>
>> -Chris
>>
> 
> Thanks, I found the GIF animation demo. Do you have an Idea how to 
> implement something like a splash screen with it?
> I tried already, but did not reach a working solution yet...

The main thing to keep in mind is that GIFAnimationCtrl relies on timers 
to know when to show the next frame, and also needs to get paint events, 
so the MainLoop needs to be running and dispatching events at a steady 
rate.  This contrasts a bit with the typical use of a splash screen, 
which is to show it and then go off and do time consuming things to 
initialize the App, and all of this before app.MainLoop is called.  So 
for the animation to work well you'll need to have already started the 
main loop, and not do anything in the gui thread that would be 
time-consuming and would block events from being delivered.


-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list