Problems with frame - update

From: ROHLFS Reiner (Reiner.Rohlfs@obs.unige.ch)
Date: Tue Nov 04 1997 - 13:43:07 MET


Hi Rooters,

please have a look to following macro:

{
  gROOT->Reset();
 
// Create a new canvas.
   c1 = new TCanvas("c1","canvas",50,10,600,300);

// create a pad
   pad = new TPad("p1", "pad", 0.05, 0.05, 0.95, 0.95); 
   pad->SetFillColor(17);
   pad->Draw();

// draw a frame
   pad->cd();
   pad->DrawFrame(0. ,0., 2., 2.);

   pad->Update();

   pad->SetTopMargin(0.2);
   pad->SetBottomMargin(0.2);
   pad->SetRightMargin(0.2);
   pad->SetLeftMargin(0.2);

   pad->Modified();
   pad->Update();
}

After the run of this macro there are two frames on the pad. The old one with
margins of 0.1 without axis and the new one with margins of 0.2. 
After resizing the window, the pad or the new frame the old frame (margin 0.1)
disappears.

There is no problem without the first call of pad->Modified(). But in my
application I want to change the margins of the frame after the frame was
displayed the first time with the old margins.

May be this is the same problem I had with updating TGaxis which have reported
last Friday?  But I do not have your last development version 1.03/07 to check
this by myself.

Thanks for your help
Reiner.



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:22 MET