Desperately needing Help with 2 features of a program

Richie Hindle richie at entrian.com
Wed Aug 25 12:13:58 EDT 2004


[Justin]
> 1.  Update the label on a radiobox

rb.SetItemLabel(3, "Richie's stuff") 

> 2.  Create a downlaod status progress bar.  (I guess this has to be
> threaded, many attempts led to endless erros about not using the
> proper thread to interact with the GUI)

That's more than a one-liner.  8-)

The Wiki page at http://wiki.wxpython.org/index.cgi/LongRunningTasks talks
about this kind of problem at length, and includes a couple of alternatives
to using threads.

When using threading in a GUI, the number one rule is that only the main
thread can access the GUI.  Worker threads that want to update the GUI must
do so by posting events to the main thread.  The way a typical wxPython
program does this is by defining its own event class and using wxPostEvent
to post instances of that event class to the main thread.

-- 
Richie Hindle
richie at entrian.com




More information about the Python-list mailing list