Thread updating GUI
Anand
anandpillai6 at yahoo.com
Thu Dec 19 01:08:33 EST 2002
Interesting! Refreshing the bitmap soon after it is updated
seems to fix the problem.
I will try the throbber control also.
Regards
Anand
Cliff Wells <LogiplexSoftware at earthlink.net> wrote in message news:<mailman.1040226568.31682.python-list at python.org>...
> On Wed, 2002-12-18 at 01:04, Anand B Pillai wrote:
> > This is a wxPython question. Anyway since I am using python threads I
> > shall rather post it here.
> >
> > I am trying to update a bitmap embedded in a wxPanel using a separate
> > thread
> > subclassed from Thread class in module threading. The basic idea is to
> > run the
> > thread and let it run a slideshow by changing images on the panel.
>
> Anand,
>
> If you check out the current CVS of wxPython, there is a control
> (throbber) that does pretty much what you are trying to do (in fact, if
> you set the delay on it high enough, you'd have exactly what you're
> looking for). There is also a demo of it in the wxPython demo (from
> CVS).
>
> The basic problem you are facing is that you can't update the UI
> directly from a thread. All wxPython GUI updates must be from within
> the same thread as the wxApp. The solution is to post an event and have
> an event handler that does the drawing.
>
> Regards,
More information about the Python-list
mailing list