Printing on a TGMainFrame

Hi,
I compiling an application using root objects. One of those objects I am using is TGMainFrame. Is it possible to load a folding menu on this object similar to what one finds on TCanvas objects? One of the neat things about the TCanvas objects (while running macros in under the ROOT prompt) was the ability to print the TCanvas very fast.

Thanks,
Cristian

Hi,

I’m not sure I understand what you’re asking for… TGMainframe don’t have any automatic (or built-in) context menu…

Bertrand.

Is there any way to print a plot from TGMainFrame?
Maybe I have to write my own function to send my plots on my current canvas to the printer?

Cristian

I’m a bit puzzled… You cannot draw anything in a TGMainFrame… You cannot even have a plot to be printed…
TGMainfrane is a (empty) GUI Main Frame used to build GUIs…
If you use a GUI application having a TGMainFrame, the print functionality has to be written in the user application (take a look at TRootCanvas::PrintCanvas() in TRootCanvas.cxx as example)
Bertrand.

I apologize I have been vague in my description of my issue. I have a TGMainFrame which has a private member TRootEmbeddedCanvas *fEcanvas and it is in this object where my plots reside. I will look up at the suggested examples.

Thanks,
Cristian

OK, yes, in this case, this has to be implemented on your side.

Bertrand.

Hi
I had a quick look to TRootcanvas::PrintCanvas()
Could I used this in my implementation?

i will need to have this feature available in my programs… I will keep looking for available code to do this. I was hoping there was something available in ROOT to do this.

Cristian