Re: [ROOT] How to make colz default for TBrowser?

From: Valeriy Onuchin (Valeri.Onoutchine@cern.ch)
Date: Sat Sep 20 2003 - 15:18:23 MEST


 Hi Alexander
it can be done with a trick using signal-slots:
 - create macro (e.g. tst.C) containing the following function:

void SetOpt(TObject* obj)
{
   if (obj->InheritsFrom(TH2::Class())) {
      ((TH2*)obj)->SetOption("colz");
   }
} 

  - load it 
  root[].L tst.C
 - make class signal-slot connection
  root[] TQObject::Connect("TRootBrowser","DoubleClicked(TObject*)",0,0,"SetOpt(TObject*)");

mouse double click in any root browser will invoke SetOpt function

That's all. 

Regards. Valeriy


> Hi,
> 
> in the TBrowser, I would like to click on a TH2 and have it drawn with
> option 'colz' by default. I tried to edit the root.mimes but this did not
> help. How can this be done?
> 
> Thanks for your help.
> 
> Alexander
> 
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET