Getting MenuBar for Embedded Canvas in a compiled GUI. How?

Hello dear Rooters, i hope getting you support, evenn help…

I wrote an GUI application (I started with this nice GUI Builder), compiled to some external libraries and fortunately, it runs!

Now there are some cosmetic corrections I wanna do:

I have in different tabs with different TGEmbeddedCanvas objects and I want to have the file menu of the usual TCanvas menu, to Save/Print (and so on) and the Editor/Toolbar to interactively change the canvases looking (histogram line Style and so on.).
My problem: i do not know how to Get the standard TCanvas() menu bar in the main frame, I was only able to write an own menu bar, but I do not know how to address the functionality of my EmbeddedCanvas with Editor/toolbar, Saving and so on…

Is there a simple solution for that (in the UsersGuide I found nothing concerning that topic)?

To make it clear what I want I added the menubar I have and the menubar I Want to have (including functionality!).

Best regards, and thanks for hints, says

Hi Frank,

First of all, you should post this kind of question in ROOT Support and not in My ROOT App, which is for posting users ROOT applications.

Then, for your question, you can take a look how it is done in TRootCanvas.cxx, which is the GUI implementation of TCanvas (you can copy and paste the code :wink: ). There is no “default” menu available in ROOT.


Hello Bertrand,

many thanks for your hints.

I will look at TCanvas.cxx and see if I can manage the Editor to work…

(In case of succes I will let you know.)