Re: [ROOT] Forcing TGTransientFrame to Draw before continuing

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Thu Aug 30 2001 - 12:07:19 MEST


Hi Chris,

   call gSystem->ProcessEvents() at the end of the function.

Cheers, Fons.



Chris Milne wrote:
> 
> Hi there,
> 
> I have the following function:
> 
> void loading()
> {
> 
>   TGTransientFrame     *fMain;
>   TGPictureButton      *fPictButton;
>   TGGroupFrame         *fG1;
>   TGLayoutHints        *fL3;
>    fMain = new TGTransientFrame(gClient->GetRoot(), fMain, 100, 200);
>    fMain->ChangeOptions((fMain->GetOptions() & ~kVerticalFrame) | kHorizontalFrame);
>    fPictButton = new TGPictureButton(fMain, gClient->GetPicture("loading.xpm"));
>    fMain->Resize(fPictButton->GetDefaultWidth(), fMain->GetDefaultHeight());
>    fMain->MapSubwindows();
>    fMain->SetWindowName("Loading");
>    fMain->SetWMSize(300,135);
>    fMain->MapWindow();
>    fMain->Move(300,100);
> }
> 
> This is called twice, and in both cases it is followed by a loop. In both cases the TGTransientFrame does
> not appear on the screen until the subsequent loop has ended, is there a way to force it to appear, or a
> check that will not continue until it is displayed?
> 
> cheers
> Chris Milne

-- 
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:50:58 MET