Hi Zaldy, > > Dear ROOT Users, > > (Pls disregard previous mail....wrong subject--mistake) > > How do we implement the SetMethod() of the TButton? > > For instance I modified the code produced by MyTree->MakeClass("MyClass"), > and I wanted to control the Looping by creating a control Buttons, > "Start", "Pause", "Next", and "Back" > > In the MyClass.h, I added: > > .......... > .......... > public: > void ShowMenu(); > > #endif > > void MyClass::ShowMenu() > { > TDialogCanvas * dialog = new TDialogCanvas(.......); > TButton &* button = new TButton("Button","MyClass->Loop()", ......); > button->Draw(); MyClass->Loop() is not correct. Shoud be gMyClassObject->Loop(), where gMyClassObject is global MyClass object > > dialog->cd(); > } > > But it does not work. There is an example int Tetris.cxx, All Tetris buttons use overloading of http://root.cern.ch/root/htmldoc/TButton.html#TButton:ExecuteEvent method >but i don't find > it a good stuff for a beginner. Good start would be using http://root.cern.ch/root/htmldoc/TControlBar.html as it's done in tutorials/demos.C macro. HTH. Regards. Valeriy > > Anyone knows how to make the above code work? > Thanks. > > I used, ROOT 3.04/02 Dec.18,2003 > gcc 2.91.66 > > Thanks again... > > > > > -- > > -------------------------------------------------------- > Zaldy A. Nawang > PS Users Room 2 > Yon Gokan, > E362, Neutrino Group, > IPNS, KEK, > Japan > > e-mail: zaldy@neutrino.kek.jp > Tel. No. : (81) 029864 - 5387 > -------------------------------------------------------- > >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET