Confused about wxWindow::Update() vs Refresh()
Robin Dunn
robin at alldunn.com
Fri Feb 15 11:44:37 PST 2008
Vadim Zeitlin wrote:
> On Fri, 15 Feb 2008 11:31:27 +0100 Paul Melis <paul at science.uva.nl> wrote:
>
> PM> I have a situation in which an event handler (File -> Open) starts the
> PM> processing of some data by an external library. The library provides
> PM> progress callbacks which I'm using to drive a progress bar.
> PM> But how can I force redrawing of the progress bar immediately without
> PM> using Yield()? Is this possible at all?
>
> It's possible to redraw it without using wxYield() but it's not possible
> to handle the clicks on the (optional) "Cancel" button without it. So if
> you use this button you have no choice but to call wxYield() unfortunately.
Or run the long running task in a worker thread instead of the gui thread.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wx-users
mailing list