On Mon, Mar 28, 2011 at 10:40 AM, Mark Melvin <[email protected]> wrote:
> On Fri, Mar 25, 2011 at 8:25 PM, Greg Ewing > <[email protected]>wrote: > >> Mark Melvin wrote: >> >>> I am using a Label as a type of status text. I am finding that if it >>> call set_text("String") on it, then do some other stuff right away, the text >>> is not updated until later. >>> >> >> How much later? It should get updated before the user gets >> a chance to do anything else. >> >> There's an update() method, but it's currently not available >> on all widgets. I'll see about making it more general. >> >> > I am setting the label text, doing some communication over a USB port > (which can take a couple seconds), then setting the text to something else. > I never see the first label change. Inserting time.sleep(x) does nothing, > but I am assuming this is a threading thing. It may work if I do my USB > stuff in a background thread, but that is major change and I don't really > want to get into threading for this. I have a Label "placed" inside my main > Window, and I don't see any update methods available on either of these. :( > > Thanks, > Mark. > I found a hack on Windows. If I call myWindow._win.UpdateWindow(), it refreshes immediately. Mark.
_______________________________________________ Pygui mailing list [email protected] http://mail.python.org/mailman/listinfo/pygui
