refreshing frame within loop problem

Hi All,

I'm using splitter window, which the left hand side holds a listctrl with list of tests to execute. the right hand side prints the test results.

i want to paint the current running test in color so i can tell which test in the list is running now (and to paint those who passed/failed).

the problem is that i'm running on the list with a loop, and i see the result of the background painting just when the loop ends. it seems as if the control of the frame returns at the end and just then i can see the result.

what is the best way to refresh the frame in between two consecutive tests in a loop ?

thanks in advance,
Roy.

···

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Hi Roy,

what is the best way to refresh the frame in between two
consecutive tests in a loop ?

Try to add wx.Yield() or wx.SafeYield() inside your loop and see if it makes any difference.

HTH.

Andrea.

···

_________________________________________
Andrea Gavana (gavana@kpo.kz)
Reservoir Engineer
KPDL
4, Millbank
SW1P 3JA London

Direct Tel: +44 (0) 20 717 08936
Mobile Tel: +44 (0) 77 487 70534
Fax: +44 (0) 20 717 08900
Web: http://xoomer.virgilio.it/infinity77
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Loops, unless provided with the proper statements, seize control of
the program's flow. If you're using Refresh() to update the widget,
you're merely asking for a painting event whenever the app's not busy.
Have you tried Update()?