Re: [ROOT] TGButton SetCommand query

From: Paul Dixon (paul.dixon@surfability.com)
Date: Tue Apr 23 2002 - 17:57:22 MEST


Hello Fons,

>    many small problems. All fixed in the attached tar file.
> 
Many thanks for your response... it's just what I wanted. Perhaps I can
trouble you for one more question...

When I click the PlotMe button, the canvas isn't updated - is the only way
to do this to pass a pointer to the TRootEmbeddedCanvas into PlotMe::Sinx
and then use this pointer as follows:

   TCanvas *c1 = c->GetCanvas();
   c1->Update();

Cheers,
					Paul


> 1) you must define the gPlotMe in the PlotMe.cxx file (in the header you
>    only have the declaration
> 2) gPlotMe if you want to access it via the interpreter must be declared
>    in the LinkDef.h as a global symbol
> 3) the TF1 was going out of scope at the end of Sinx() so nothing was
>    drawn
> 4) in the modified canvasgui.cxx I also show how to better use
>    signal/slots to connect the button action to PlotMe::Sinx() in which
>    case you don't need to global gPlotMe.
> 
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:51 MET