I want to write a TCanvas object into a root file and read it back using the
TCanvas::Draw() function to display the TCanvas - Window again on the screen.
I noticed some problems:
- The TCanvas which is read from the root file always has a menu bar
independent of the style of the original TCanvas which was written to the root
file. ( Properly the function call in TCanvas::Draw() of
fCanvasImp->ShowMenuBar(1) should be modified to
fCanvasImp->ShowMenuBar(fMenuBar))
- The size and the position of the TCanvas read from the root file has changed
compared to the size and the position of the original TCanvas which was written
to the root file. On my system the Y - Position is +7 Pixel, the Y - Position
is +50 Pixel, the Width is -4 Pixel and the Height is - 28 Pixel each time I
save a TCanvas Window and read it back from the root file.
- After the user has moved the window on the screen the old X/Y positions are
written to the root file, not the new ones. I can update the X/Y positions
(fCtopX and fCtopY) each time before I write the TCanvas into a root file but
it may be better to update these values each time a user moves the window.
Cheers Reiner.