Hi Thomas, after Increment() or SetPosition() you do not have to call NeedRedraw(). These methods redraw the progress bar directly. However, you have to make sure the display gets updated at that time by calling gSystem->ProcessEvents(); Cheers, Fons. Thomas Bretz wrote: > > Hello rooters, > > I have a TGMainFrame with a button in it. Pressing the button calles > (from ProcessEvents) a subroutine which does some vent processing. In > this subroutine I create a TGHProgressBar (via > TGHProgressBar(TGMainFrame*)) and add it to the MainFrame via > TGMainFrame::AddFrame(TGHProgressBar*). After Layout() and > MapSubwindows() it appears in the window like expected. No I loop over > my n events. Before starting to loop I call TGHProgressBar->SetRange(0, > n) and after each event I call TGHProgressBar->SetPosition(i). But the > progressbar stays still empty. Do I have to call something like > gClient->DoRedraw or gClient->NeedRedraw(TGProgressBar)? I tried > something of this but it fails. > > Thanks in advance, > Thomas. -- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248 WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7679480
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:05 MET