Using listbox as an output

Hi all,
I have a question for those of you who have used Root to make gui’s. Im writing a simple test program where i have 2 text edit boxes that i am using as inputs and a list box that i want to use as an output field. I am able to get the entered numbers from the edit boxes and, add them (or do whatever process) through a button and then output the result in the listbox.
But what i really what to do is do loops of calculations after clicking the button and keep outputing data to the listbox. Right now all the data is outputted at the same time, ie when all calculations are done; at the end of 100 iterations lets say.
Is there a way with listboxes that i can update or refresh the screen each time?? or is listboxes just not the way to go for this outputing purpose??

Thanks!

John

Add this code in your loop :

fMyListBox->AddEntry(myString, index); gClient->NeedRedraw(fMyListBox); fMyListBox->MapSubwindows(); fMyListBox->Layout(); gSystem->ProcessEvents(); // handle GUI events
Cheers,
Bertrand.