Re: Canvas::ToolBar,(mainmenu)

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Dec 15 1998 - 15:55:29 MET


Grigory Trubnikov wrote:
> 
> Dear ROOT Developers !
> I'm only beginner in the ROOT, and want to create some application for
> my physic tasks.
> For about 3-4 days I tryed to find out  in "ROOT System manual" how I
> can change the default ToolBar (main menu) of ROOT canvas to my own
> style (which I wanted : with my popups and titles), but I couldn't find
> the source text (listing) of this. I don't know how I can call
> Canvas::ToolBar (if such ever exists...) ?
> May be you'll help me in my problems?
> Sincerely yours,
> Grigory Trubnikov.

Hi Grigory,
If you are a beginner with Root, I would strongly suggest that
you do not start modifying the canvas standard toolbar.
There are better solutions:
 - Create your own classes and declare your member functions
   visible in the context menu. To do that, simply add the comment
   string  // *MENU * after the member function declaration on the
   same line (see examples in Root classes, eg, TPad, TCanvas).
   When you draw an object of your class in the canvas, you can click
   with the right button to get the context menu for this object.
   (see also http://root.cern.ch/root/HowtoDraw.html and HowtoPick.html
 - Create a TControlBar
 - See example program in $ROOTSYS/test/guitest

Rene Brun



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